Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Genomics101
    Member
    • May 2012
    • 60

    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!
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    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

    Comment

    • Genomics101
      Member
      • May 2012
      • 60

      #3
      @lindenb looks like just what I need, I'll let you know how it goes!

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
        by SEQadmin2


        Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

        The systematic characterization of the human proteome has
        ...
        07-20-2026, 11:48 AM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        07-09-2026, 11:10 AM
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 11:41 AM
      0 responses
      10 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-20-2026, 11:10 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-13-2026, 10:26 AM
      0 responses
      37 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      45 views
      0 reactions
      Last Post SEQadmin2  
      Working...