Question: How to calculate allele counts(Ref and alt) using a target bed file and aligned bam sample files
gravatar for prernagoel04
15 months ago by
prernagoel040 wrote:

Hi all.

I have multiple .bam files(aligned RNA-Seq data) and I have a set of regions from all the files (chr str stp) in a bed format. I would like to check for variants only in these regions rather through out the genome. Specifically, I want the allele counts for Ref and Alt at all of the positions in my .bed file. I am trying to use samtools mpileup for the same but I am getting an empty output file. I have been trying to set the correct parameters for my task but every time there is some error. Any help is greatly appreciated. Thankyou.

I have tried using the following command. samtools mpileup -l file.bed -f hg38.fa file1.sorted.bam | bcftools view > file1.vcf

This command is giving a vcf file but the positions in my target .bed file and this output vcf file don't match. Also, is it necessary to provide a reference file, rather in what scenario can I use the --no-reference option?

ADD COMMENTlink modified 15 months ago by H.Hasani970 • written 15 months ago by prernagoel040
gravatar for H.Hasani
15 months ago by
Freiburg, Germany
H.Hasani970 wrote:

You can try GATK with -L, see Intervals and interval lists


ADD COMMENTlink written 15 months ago by H.Hasani970
Please log in to add an answer.


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