Hi,
I have tried to use the below pipeline based on the above suggestion.
$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 step has completed successfully, it created an empty file.
Could you please help me understand what might be the reason?
Edit:
This has been posted in a new thread not to hijack this unnoticed one.