Skip to content

Commit

Permalink
Fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Mar 25, 2024
1 parent 22f85a8 commit 5d8961e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
repository_type: pipeline
lint:
template_strings:
- modules/local/report/create/app/templates/tf.html
- modules/local/report/create/app/templates/tg.html
- modules/local/report/create/app/templates/macros.html
- modules/local/report/create/app/templates/configuration.html
- modules/local/report/create/app/templates/snp.html
- modules/local/report/create/app/templates/base.html
3 changes: 2 additions & 1 deletion modules/local/report/create/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ process CREATE {
path(schema)

output:
path("report")
path("report") , emit: report
path("versions.yml"), emit: versions

script:
params_string = JsonOutput.toJson(params)
Expand Down
8 changes: 8 additions & 0 deletions modules/local/report/create/templates/build.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env python3

from jinja2 import Environment, PackageLoader, select_autoescape
import jinja2
import os
import shutil
import json
import pandas as pd
import sys
from collections import defaultdict

module_app = os.path.abspath("$moduleDir/app")
Expand Down Expand Up @@ -121,3 +123,9 @@

with open(os.path.join(out_dir, "ranking.js"), "w") as f:
f.write(ranking_js.render())

with open("versions.yml", "w") as f:
f.write('"${task.process}":\\n')
f.write(f' python: "{sys.executable}"\\n')
f.write(f' pandas: "{pd.__version__}"\\n')
f.write(f' jinja2: "{jinja2.__version__}"\\n')
2 changes: 1 addition & 1 deletion subworkflows/local/ranking.nf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ workflow RANKING {
COMBINE_TFS_PER_ASSAY.out.versions,
COMBINE_TFS_ACROSS_ASSAYS.out.versions,
COMBINE_TGS_PER_ASSAY.out.versions,
COMBINE_TGS_PER_ASSAY.out.versions
COMBINE_TGS_ACROSS_ASSAYS.out.versions
)


Expand Down
7 changes: 7 additions & 0 deletions subworkflows/local/report.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ workflow REPORT {
ch_differential

main:
ch_versions = Channel.empty()

CREATE(ch_tf_ranking.map{meta, ranking -> ranking}
.collect()
.map{rankings -> [[id: "tfs"], rankings]},
Expand All @@ -17,4 +19,9 @@ workflow REPORT {
.collect()
.map{diffs -> [[id: "diffs"], diffs]},
params, Channel.value(file(projectDir + "/nextflow_schema.json")))

ch_versions = ch_versions.mix(CREATE.out.versions)

emit:
versions = ch_versions
}
14 changes: 8 additions & 6 deletions workflows/tfactivity.nf
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,20 @@ workflow TFACTIVITY {
alpha
)

ch_versions = ch_versions.mix(
COUNTS.out.versions,
PEAKS.out.versions,
DYNAMITE.out.versions
)

REPORT(
RANKING.out.tf_ranking,
RANKING.out.tg_ranking,
COUNTS.out.differential
)

ch_versions = ch_versions.mix(
COUNTS.out.versions,
PEAKS.out.versions,
DYNAMITE.out.versions,
RANKING.out.versions,
REPORT.out.versions
)

//
// Collate and save software versions
//
Expand Down

0 comments on commit 5d8961e

Please sign in to comment.