Skip to content

Commit e8a186b

Browse files
authored
Merge pull request #85 from nf-core/fix_samtools_index
Fix samtools index #84
2 parents 29a394a + e55dae4 commit e8a186b

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
* [#80](https://github.com/nf-core/eager/pull/80) - BWA Index file handling
1111
* [#77](https://github.com/nf-core/eager/pull/77) - Lots of documentation updates by [@jfy133](https://github.com/jfy133)
1212

13+
### `Fixed`
14+
* [#84](https://github.com/nf-core/eager/pull/85) - Fix for [Samtools index issues](https://github.com/nf-core/eager/issues/84)
15+
1316
## [2.0.2] - 2018-11-03
1417

1518
### `Changed`

main.nf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ process bwa {
590590
"""
591591
bwa aln -t ${task.cpus} $fasta $reads -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f "${reads.baseName}.sai"
592592
bwa samse -r "@RG\\tID:ILLUMINA-${prefix}\\tSM:${prefix}\\tPL:illumina" $fasta "${reads.baseName}".sai $reads | samtools sort -@ ${task.cpus} -O bam - > "${prefix}".sorted.bam
593-
samtools index -@ ${task.cpus} "${prefix}".sorted.bam
593+
samtools index "${prefix}".sorted.bam
594594
"""
595595
}
596596

@@ -642,7 +642,7 @@ process circularmapper{
642642
bwa samse -r "@RG\\tID:ILLUMINA-${prefix}\\tSM:${prefix}\\tPL:illumina" "${fasta.baseName}_${params.circularextension}.fasta" "${reads.baseName}".sai $reads > tmp.out
643643
realignsamfile -e ${params.circularextension} -i tmp.out -r $fasta $filter
644644
samtools sort -@ ${task.cpus} -O bam tmp_realigned.bam > "${prefix}".sorted.bam
645-
samtools index -@ ${task.cpus} "${prefix}".sorted.bam
645+
samtools index "${prefix}".sorted.bam
646646
"""
647647
}
648648

@@ -724,12 +724,12 @@ process samtools_filter {
724724
"""
725725
samtools view -h $bam | tee >(samtools view - -@ ${task.cpus} -f4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.unmapped.bam) >(samtools view - -@ ${task.cpus} -F4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.filtered.bam)
726726
samtools fastq -tn "${prefix}.unmapped.bam" | gzip > "${prefix}.unmapped.fq.gz"
727-
samtools index -@ ${task.cpus} ${prefix}.filtered.bam
727+
samtools index ${prefix}.filtered.bam
728728
"""
729729
} else {
730730
"""
731731
samtools view -h $bam | tee >(samtools view - -@ ${task.cpus} -f4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.unmapped.bam) >(samtools view - -@ ${task.cpus} -q ${params.bam_mapping_quality_threshold} -o ${prefix}.filtered.bam)
732-
samtools index -@ ${task.cpus} ${prefix}.filtered.bam
732+
samtools index ${prefix}.filtered.bam
733733
"""
734734
}
735735
}
@@ -764,14 +764,14 @@ process dedup{
764764
dedup -i $bam $treat_merged -o . -u
765765
mv *.log dedup.log
766766
samtools sort -@ ${task.cpus} "$prefix"_rmdup.bam -o "$prefix".sorted.bam
767-
samtools index -@ ${task.cpus} "$prefix".sorted.bam
767+
samtools index "$prefix".sorted.bam
768768
"""
769769
} else {
770770
"""
771771
dedup -i $bam $treat_merged -o . -u
772772
mv *.log dedup.log
773773
samtools sort -@ ${task.cpus} "$prefix"_rmdup.bam -o "$prefix".sorted.bam
774-
samtools index -@ ${task.cpus} "$prefix".sorted.bam
774+
samtools index "$prefix".sorted.bam
775775
"""
776776
}
777777
}

0 commit comments

Comments
 (0)