Question: finding unique mutations from a multi-sample VCF
0
gravatar for firatuyulur
22 months ago by
firatuyulur250
firatuyulur250 wrote:

Hi all,

I have gone through many posts and couldnt find my answer. I have a vcf file of 4 samples. What I want to reach from it is the list of unique mutations among samples. Example, at position N their genotypes are as ; 0/1 0/0 0/0 0/0. In such case, this is a unique mutation for sample1 at position N. I have gathered an R script where it does what I want at the end but it is not a very useful way of doing such trivial thing. Any recommendation would be helpful.

snp vcf • 777 views
ADD COMMENTlink modified 22 months ago by Pierre Lindenbaum117k • written 22 months ago by firatuyulur250
2
gravatar for Floris Brenk
22 months ago by
Floris Brenk870
USA
Floris Brenk870 wrote:

Why not filter on minor allele frequency using vcftools?

Using for example --max-maf you can set the maximum in this case you have 8 alleles so max allele frequency would be 0.125

http://vcftools.sourceforge.net/man_latest.html

ADD COMMENTlink written 22 months ago by Floris Brenk870
0
gravatar for Pierre Lindenbaum
22 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum117k wrote:

using vcfilterjs

 java -jar  dist/vcffilterjs.jar  -e 'function accept(v) { var i,n=0;for(i=0;i< v.getNSamples();++i) { var g=v.getGenotype(i); n+=(g.isHomVar() || g.isHet() ?1:0);} return n==1;} accept(variant);' input.vcf > output.vcf
ADD COMMENTlink written 22 months ago by Pierre Lindenbaum117k
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: 805 users visited in the last hour