Question: Filtering no-calls from VCF file
gravatar for SOHAIL
4.3 years ago by
Beijing Institute of Genomics, CAS.
SOHAIL330 wrote:

Hi Everyone, i want to remove all sites with more than 5% of no-call (./.) among all the samples in my VCF file, could you please guide me how i can do that variant filtration??


vcf-tools ngs • 2.0k views
ADD COMMENTlink modified 4.3 years ago by Pierre Lindenbaum133k • written 4.3 years ago by SOHAIL330
gravatar for Pierre Lindenbaum
4.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

using vcffilterjs

 java -jar dist/vcffilterjs.jar -e 'var n=0.0;for(var i=0;i< variant.getNSamples();i++ ) { if(variant.getGenotype(i).isNoCall()) n++;} n/ variant.getNSamples() < 0.05'  input.vcf
ADD COMMENTlink written 4.3 years ago by Pierre Lindenbaum133k

Thanks @Pierre.. That worked perfectly fine for me..

However i am curious and interested to use VCFFILTERJS more, Could you please indicate any guideline for writing java scripts expressions particularly for VCFFILTER -e. I have seen some examples but i wanna know about basic functions like: variant.getNSamples() or variant.getGenotype().isNoCall() , etc.

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by SOHAIL330

this tools uses a javascript engine (nashorn) that can read the underlying java classes of the htsjdk library like . It uses a old and well-known java technology called reflection: .

ADD REPLYlink written 4.3 years ago by Pierre Lindenbaum133k
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: 2111 users visited in the last hour