epam / fonda

Fonda is a framework which offers scalable and automatic analysis of multiple NGS sequencing data types
Apache License 2.0
8 stars 2 forks source link

Bam2Fastq workflow sort and index bam steps fail #140

Open kamyshova opened 4 years ago

kamyshova commented 4 years ago

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:

[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.