Set minimum variant frequency while calling variants with samtools
1
0
Entering edit mode
5.2 years ago
kspata ▴ 80

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!!

samtools resequencing alignment variant frequency • 1.6k views
ADD COMMENT
0
Entering edit mode
5.2 years ago

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

ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2553 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6