samtools error when using pipeline view/sort/index
1
0
Entering edit mode
9.6 years ago
deepue ▴ 160

Hi,

I have tried to use the below pipeline based on the suggestion in this post.

$BWAPATH/bwa mem $REFPATH/hg19 $DATPATH/R1.fastq.gz $DATPATH/R2.fastq.gz | $SAMPATH/samtools view -Sb - | $SAMPATH/samtools sort - sorted && $SAMPATH/samtools index - > $DATPATH/sorted.bam

The subsequent step is failing with error message sorted.bam is not coordinate sorted.

To my surprise, though the above step has completed successfully, it created an empty file.

Could you please help me understand what might be the reason?

pipeline SNP next-gen-sequencing samtools • 2.8k views
ADD COMMENT
1
Entering edit mode
9.6 years ago

One problem is that last line should be something like:

$SAMPATH/samtools index sorted.bam

(I haven't tested the rest but looks ok)

ADD COMMENT

Login before adding your answer.

Traffic: 889 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6