Question: Samtools Mpileup Defined Regions
0
gravatar for Vova Naumov
4.9 years ago by
Vova Naumov210
Russia, Moscow
Vova Naumov210 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?

samtools • 2.4k views
ADD COMMENTlink modified 4.9 years ago by swbarnes23.9k • written 4.9 years ago by Vova Naumov210
2

Please take a closer look at mpileup in samtools. The documentation clearly states how to call variants and use a bed file.

ADD REPLYlink written 4.9 years ago by Zev.Kronenberg11k

Thank's a lot but an example would be very helpful

ADD REPLYlink written 4.9 years ago by Vova Naumov210
1
gravatar for swbarnes2
4.9 years ago by
swbarnes23.9k
United States
swbarnes23.9k wrote:

I'd use BEDTools intersectBed to get the intersection between your all-points vcf and your bed file coordinates. That's way simpler than making a consensus fastq.

ADD COMMENTlink written 4.9 years ago by swbarnes23.9k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1498 users visited in the last hour