I am trying to filter several steps before the mpileup:
1) samtools sort -n in.bam out.bam # sort the bam file
2) samtools rmdup -sS in.srt.bam out.bam # remove PCR duplicates
3) samtools view -b -F 1024 -q 20 *.bam > out.bam # filter duplicates reads and mapping quality
4) samools index .bam # give a index so that for mpileup
However, for the index step, it shows
"[bam_index_core] the alignment is not sorted: reads without coordinates prior to reads with coordinates." Anything wrong here?
1) samtools sort -n in.bam out.bam # sort the bam file
2) samtools rmdup -sS in.srt.bam out.bam # remove PCR duplicates
3) samtools view -b -F 1024 -q 20 *.bam > out.bam # filter duplicates reads and mapping quality
4) samools index .bam # give a index so that for mpileup
However, for the index step, it shows
"[bam_index_core] the alignment is not sorted: reads without coordinates prior to reads with coordinates." Anything wrong here?
Comment