At the time of launching Fonda Bam2Fastq workflow, we faced a problem, that the Samtools tool was sending error messages to output error file during "Index bam" step such as:
[bam_index_core] the alignment is not sorted
[bam_index_build2] fail to index the BAM file.
Despite that fact, that before it Fonda sorts the bam file by readnames by Picard tool.
We've tried to fix this error by sort the bam with different versions of Picard tool, but our attempts were unsuccessful. But we managed to fix it with another option. The "Index bam" step is performed by Samtools tool. We have tried to sort bam file by using Samtools (v 1.9) sort with -n option (sort by readname) and the pipeline finished properly.
Approach
Perhaps we should replace Picard SortSam tool by Samtools sort tool with the -n option.
Background
At the time of launching Fonda
Bam2Fastq
workflow, we faced a problem, that the Samtools tool was sending error messages to output error file during "Index bam" step such as:Despite that fact, that before it Fonda sorts the bam file by readnames by Picard tool. We've tried to fix this error by sort the bam with different versions of Picard tool, but our attempts were unsuccessful. But we managed to fix it with another option. The "Index bam" step is performed by Samtools tool. We have tried to sort bam file by using Samtools (v 1.9) sort with -n option (sort by readname) and the pipeline finished properly.
Approach Perhaps we should replace Picard
SortSam
tool by Samtoolssort
tool with the-n
option.