Skip to content

Commit

Permalink
Fix contig2bin processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Downie committed Dec 6, 2024
1 parent 629cdd2 commit 8cef726
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ process {
}

withName: 'RENAME_DASTOOL_BINS' {
ext.prefix = { "${meta.id}_${meta.assembler}_dastool_contig2bin" }
ext.args = { "" }
ext.args2 = { "'{if(\$2 != prev) { count++ }; print \$1,"${prefix}_"count; prev = \$2}'" }
ext.prefix = { "${meta.id}_${meta.assembler}_${meta.binner}_contig2bin" }
tag = { "${meta.id}_${meta.assembler}_${meta.binner}" }
ext.args2 = { "'{if(\$2 != prev) { count++ }; print \$1,\"${meta.id}_${meta.assembler}_dastool_\"count; prev = \$2}'" }
tag = { "${meta.id}_${meta.assembler}_dastool" }
}

withName: 'SEQKIT_STATS' {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/contig2bin2fasta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ process CONTIG2BIN2FASTA {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: ""
def prefix = task.ext.prefix ?: "${meta.id}"
def extension = input_is_prodigal_aa ? "faa" : "fa"
def input_aa = input_is_prodigal_aa ? "_.*" : ""
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/magscot/magscot/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ process MAGSCOT_MAGSCOT {
mv MAGScoT.refined.out ${prefix}.MAGScoT.refined.out
## magscot puts out contig2bin file in wrong format
awk 'NR > 1 {print \$2 \$1}' MAGScoT.refined.contig_to_bin.out > ${prefix}.MAGScoT.refined.contig_to_bin.out
awk 'BEGIN{OFS="\t"} NR > 1 {print \$2,\$1}' MAGScoT.refined.contig_to_bin.out > ${prefix}.MAGScoT.refined.contig_to_bin.out
rm MAGScoT.refined.contig_to_bin.out
cat <<-END_VERSIONS > versions.yml
Expand Down

0 comments on commit 8cef726

Please sign in to comment.