I am trying to call variants with SAMTools mpileup using a BAM output of the SRMA program but am encountering problems whereby mpileup gives zero output.
It works fine when I use a BAM file generated pre-realignment so it is quite possible something is missing from my workflow post-realignment.
The original realignment was performed by splitting by chromosome so the subsequent steps I have employed are:
1) samtools merge -h original.sam realigned.bam *bam (merge all bam files)
2) samtools sort -n realigned.bam realigned_nsort.bam (sort by query names)
3) samtools fixmate realigned_nsort.bam realigned_fixed.bam (fix mate pair info)
4) MarkDuplicates I= realigned_fixed.bam O=final.bam (mark duplicate reads)
5) samtools sort realigned_fixed.bam final.bam (sort by coordinates)
6) samtools mpileup -uf genome.index final.bam
Mpileup generates nothing at this point. Can anyone suggest what might be going wrong?
It works fine when I use a BAM file generated pre-realignment so it is quite possible something is missing from my workflow post-realignment.
The original realignment was performed by splitting by chromosome so the subsequent steps I have employed are:
1) samtools merge -h original.sam realigned.bam *bam (merge all bam files)
2) samtools sort -n realigned.bam realigned_nsort.bam (sort by query names)
3) samtools fixmate realigned_nsort.bam realigned_fixed.bam (fix mate pair info)
4) MarkDuplicates I= realigned_fixed.bam O=final.bam (mark duplicate reads)
5) samtools sort realigned_fixed.bam final.bam (sort by coordinates)
6) samtools mpileup -uf genome.index final.bam
Mpileup generates nothing at this point. Can anyone suggest what might be going wrong?
Comment