Skip to content

Commit

Permalink
Make binqc_tool an input for BIN_SUMMARY
Browse files Browse the repository at this point in the history
  • Loading branch information
dialvarezs committed Nov 27, 2024
1 parent 6152696 commit ef1828c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
42 changes: 22 additions & 20 deletions modules/local/bin_summary.nf
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
process BIN_SUMMARY {

conda "conda-forge::pandas=1.4.3"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pandas:1.4.3' :
'biocontainers/pandas:1.4.3' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/pandas:1.4.3'
: 'biocontainers/pandas:1.4.3'}"

input:
path(bin_depths)
path(binqc_sum)
path(quast_sum)
path(gtdbtk_sum)
path(cat_sum)
path bin_depths
path binqc_sum
path quast_sum
path gtdbtk_sum
path cat_sum
val binqc_tool

output:
path("bin_summary.tsv"), emit: summary
path "versions.yml" , emit: versions
path "bin_summary.tsv", emit: summary
path "versions.yml" , emit: versions

script:
def binqc_summary = binqc_sum.sort().size() > 0 ? "--binqc_summary ${binqc_sum}" : ""
def quast_summary = quast_sum.sort().size() > 0 ? "--quast_summary ${quast_sum}" : ""
def binqc_summary = binqc_sum.sort().size() > 0 ? "--binqc_summary ${binqc_sum}" : ""
def quast_summary = quast_sum.sort().size() > 0 ? "--quast_summary ${quast_sum}" : ""
def gtdbtk_summary = gtdbtk_sum.sort().size() > 0 ? "--gtdbtk_summary ${gtdbtk_sum}" : ""
def cat_summary = cat_sum.sort().size() > 0 ? "--cat_summary ${cat_sum}" : ""
def cat_summary = cat_sum.sort().size() > 0 ? "--cat_summary ${cat_sum}" : ""
"""
combine_tables.py --depths_summary ${bin_depths} \
$binqc_summary \
$quast_summary \
$gtdbtk_summary \
$cat_summary \
--binqc_tool ${params.binqc_tool} \
--out bin_summary.tsv
combine_tables.py \
--depths_summary ${bin_depths} \
${binqc_summary} \
${quast_summary} \
${gtdbtk_summary} \
${cat_summary} \
--binqc_tool ${binqc_tool} \
--out bin_summary.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
3 changes: 2 additions & 1 deletion workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ workflow MAG {
ch_bin_qc_summary.ifEmpty([]),
ch_quast_bins_summary.ifEmpty([]),
ch_gtdbtk_summary.ifEmpty([]),
ch_cat_global_summary.ifEmpty([])
ch_cat_global_summary.ifEmpty([]),
params.binqc_tool
)
}

Expand Down

0 comments on commit ef1828c

Please sign in to comment.