Question: Set minimum variant frequency while calling variants with samtools
0
gravatar for kspata
15 months ago by
kspata70
Chicago
kspata70 wrote:

Hi All,

Currently I am using following command to call variants using samtools/bcftools.

samtools mpileup -d 1000000 -L 1000000 -uf ref.fasta sample.sorted.bam | bcftools view -vcg  - > sample.SAMtools.vcf

What I want is to report the variants present at and above 1% variant frequency in the vcf file. I looked into both mpileup, bcftools view, and bcftools call manual but could not find any parameter to set variant frequency.

This option is available in freebayes (-F 0.01) and VarScan (--min-var-freq 0.01).

How can I set these parameters for samtools and know what default parameters are used?

Thanks!!

ADD COMMENTlink modified 15 months ago by Istvan Albert ♦♦ 84k • written 15 months ago by kspata70
0
gravatar for Istvan Albert
15 months ago by
Istvan Albert ♦♦ 84k
University Park, USA
Istvan Albert ♦♦ 84k wrote:

You can filter your VCF file as it is being produced with bcf filter

ADD COMMENTlink modified 15 months ago • written 15 months ago by Istvan Albert ♦♦ 84k

Hi Istvan,

I tried the following command but it does not seem to work.

 samtools mpileup -d 1000000 -L 1000000 -uf ref.fasta Sample.sorted.bam | bcftools view -vcg -i 'MAF[*] >= 0.5'  - > Sample.SAMtools_VF50.vcf

This should give me the variants present at > 50 % frequency but all variants are reported even those which are less than 50%.

Can you please give me an example of the bcf filter command which you mentioned?

ADD REPLYlink written 15 months ago by kspata70
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: 1386 users visited in the last hour