Skip to content

Commit

Permalink
cleanup, remove -5 bwa default argument, remove samtools fixmate step…
Browse files Browse the repository at this point in the history
…, add ugly grep hack to avoid samtools header issue
  • Loading branch information
MartinPippel committed Nov 21, 2024
1 parent 2fca1ac commit 2c25a73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions configs/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ process {
}

// scaffolding
withName: 'BWAMEM2_MEM' {
withName: 'BWAMEM2_MEM_SCAFFOLD' {
ext.prefix = { "${meta.id}_${meta.assembly.build}_${reads.head().getBaseName(reads.head().name.endsWith(".gz") ? 2 : 1)}" }
ext.args = '-5SP -T0'
ext.args = '-SP -T0'
ext.args2 = { sort_bam ? "--write-index" : "" }
}

Expand Down Expand Up @@ -371,7 +371,7 @@ process {
// scaffolding curation
withName: 'BWAMEM2_MEM_CURATION' {
ext.prefix = { "${meta.id}_${meta.assembly.build}_${reads.head().getBaseName(reads.head().name.endsWith(".gz") ? 2 : 1)}" }
ext.args = '-5SP -T0'
ext.args = '-SP -T0'
ext.args2 = { sort_bam ? "--write-index" : "" }
}

Expand All @@ -382,8 +382,7 @@ process {
withName: 'TWOREADCOMBINER_FIXMATE_SORT' {
ext.prefix = { "${bam.head().getBaseName(1)}" }
ext.args = { "${params.hic_map_qv}" } // min hic map quality
ext.args2 = { "-mpu" }
ext.args3 = '--write-index -l1'
ext.args2 = '--write-index -l1'
}

withName: 'SCAFFOLD_CURATION:SAMTOOLS_MERGE_(HIFI|HIC)' {
Expand Down
2 changes: 1 addition & 1 deletion modules/local/hic_curation/tworeadcombiner_fixmate_sort.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ process TWOREADCOMBINER_FIXMATE_SORT {

"""
perl ${projectDir}/bin/two_read_bam_combiner_sanger.pl ${bam} samtools ${args} | \\
samtools fixmate -@${task.cpus} ${args2} - - | \\
grep -v -e "^@HD" | \\
samtools sort ${args3} -@${task.cpus} -T sort_tmp -o ${prefix}_comb.bam -
cat <<-END_VERSIONS > versions.yml
Expand Down

0 comments on commit 2c25a73

Please sign in to comment.