Hi
I have been generating consensus sequences from a BWA-aligned BAM file using the following script:
samtools mpileup -Euf Reference.fasta input.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
In Tablet view the BAM file shows decent coverage across the genome and my reads have been quality filtered. My issue is that the consensus sequence has Ns even in positions where I can clearly see reads that map to the reference. At first I thought this was to do with a default read depth cutoff, but even accounting for this the numbers don't add up!
Does anyone know why mpileup is calling an N at certain positions?
I have been generating consensus sequences from a BWA-aligned BAM file using the following script:
samtools mpileup -Euf Reference.fasta input.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
In Tablet view the BAM file shows decent coverage across the genome and my reads have been quality filtered. My issue is that the consensus sequence has Ns even in positions where I can clearly see reads that map to the reference. At first I thought this was to do with a default read depth cutoff, but even accounting for this the numbers don't add up!
Does anyone know why mpileup is calling an N at certain positions?
Comment