SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
ANNOVAR dropped variants... is the MAF filter working? jmatÚs Bioinformatics 4 08-19-2013 02:21 AM
count number of A,C,G,T using DP4 in VCF gcrdb Bioinformatics 4 03-18-2013 03:28 AM
VCF file - no ALT but DP4 alternative exist Rachelly Bioinformatics 2 04-04-2012 02:12 AM
No reference/alternate (DP4) read depth in VCF? Tally Bioinformatics 0 02-20-2012 03:33 PM
Filter out reads with several variants david.tamborero Bioinformatics 0 01-25-2012 08:31 AM

Reply
 
Thread Tools
Old 09-23-2013, 06:42 AM   #1
Genomics101
Member
 
Location: Maryland, USA

Join Date: May 2012
Posts: 60
Default Filter variants by DP4 (total)?

Greetings. I have found that in my particular data set that the most sensitive factor for true variants versus false positives is actually the DP4 (the total number) rather than the QUAL score or depth (DP). Is there a program or little script to filter by the total DP4? Thanks!
Genomics101 is offline   Reply With Quote
Old 09-23-2013, 09:26 AM   #2
lindenb
Senior Member
 
Location: France

Join Date: Apr 2010
Posts: 143
Default filtering a VCF with javascript

I wrote a tool named vcffilterjs to filter a VCF using a javascript expression: See: https://github.com/lindenb/jvarkit#-...ascript-rhino-

Example:
wth
Code:
function accept()
	{
	var DP4=variant.getAttribute("DP4");
	if(DP4==null || DP4.size()!=4) return false;
	return  DP4.get(0)+DP4.get(1)+DP4.get(2)+DP4.get(3)<10;
	}
accept();
Code:
$ curl "https://raw.github.com/CBMi-BiG/snpEff/master/tests/vcf_homo.vcf" | \
java -jar dist/vcffilterjs.jar SCRIPT_FILE=filter.js 2> /dev/null
Code:
(...)
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	s_1_ACAGTGA_sort.bam
Y	3720217	.	A	G	8.65	.	AC=2;AF1=1;AN=2;CI95=0.5,1;DP=2;DP4=0,0,0,1;FQ=-30;G3=4.415e-15,5.291e-06,1;MQ=38;SF=5	GT:GQ:PL	0/0:61:60,6,0
Y	3721230	.	C	G	21.80	.	AC=2;AF1=1;AN=2;CI95=0.5,1;DP=2;DP4=0,0,0,2;FQ=-33;G3=1.456e-17,8.564e-07,1;MQ=29;SF=3	GT:GQ:PL	1/1:61:60,6,0
Y	3744605	.	C	A	3.98	.	AC=2;AF1=1;AN=2;CI95=0.5,1;DP=2;DP4=0,0,0,2;FQ=-33;G3=1.468e-15,8.599e-07,1;MQ=19;SF=2	GT:GQ:PL	0/0:61:60,6,0
Y	9945223	.	ATTT	ATTTT	19.80	.	AC=4;AF1=1;AN=4;CI95=0.5,1;DP=2;DP4=0,0,0,2;FQ=-40.5;G3=2.906e-18,8.564e-07,1;INDEL;MQ=45;SF=0,2	GT:GQ:PL	1/1:61:60,6,0
lindenb is offline   Reply With Quote
Old 09-23-2013, 09:46 AM   #3
Genomics101
Member
 
Location: Maryland, USA

Join Date: May 2012
Posts: 60
Default

@lindenb looks like just what I need, I'll let you know how it goes!
Genomics101 is offline   Reply With Quote
Reply

Tags
dp4, filter, variant analysis

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:03 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO