Question: Samtools Mpileup Defined Regions
0
Vova Naumov • 220 wrote:
Hi! I need to get genotypes in a list of positions (for example BED file) having BAM file. Trying to use tool samtools mpileup. I know I can do it by creating consensus fastq using
samtools mpileup -uf hg19.fa file.bam | \
bcftools view -cg - | \
perl vcfutils.pl vcf2fq > consensus.fastq
and then getting genotypes from fastq file, but it's ineffective. Do you know how to get differences from reference, genotype calls at interesting positions simultaneously?
ADD COMMENT
• link
•
modified 7.3 years ago
by
swbarnes2 ♦ 9.4k
•
written
7.3 years ago by
Vova Naumov • 220
Please take a closer look at mpileup in samtools. The documentation clearly states how to call variants and use a bed file.
Thank's a lot but an example would be very helpful