Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pingu
    Member
    • Jul 2015
    • 26

    #1

    snpsift

    Hello!
    I have used varscan in order to call my variants,now I would like filter they using frequency,
    So I have tried snpsift, with this command:
    java -jar SnpSift.jar filter "(GEN[*].FREQ>20)" midvarScan1.snp.vcf.gz > output
    But my file in empty.
    This a sample of my file:
    Code:
    #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	Sample1
    chr13	32893198	.	T	G	.	PASS	ADP=58;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:73:58:58:13:19:50%:3,9837E-8:25:26:12:1:0:19
    chr13	32900364	.	T	C	.	PASS	ADP=166;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:101:166:166:72:30:26,32%:7,608E-11:23:23:52:20:11:19
    chr13	32900607	.	A	T	.	PASS	ADP=121;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:162:121:121:70:46:39,66%:5,2238E-17:26:25:66:4:0:46
    chr13	32903685	.	C	T	.	PASS	ADP=143;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:193:143:143:88:55:38,46%:4,2774E-20:27:27:48:40:36:19
    chr13	32912299	.	T	C	.	PASS	ADP=279;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:279:279:161:117:41,94%:9,8413E-43:28:27:58:103:46:71
    chr13	32913055	.	A	G	.	PASS	ADP=289;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:289:289:0:288:99,65%:1,2167E-172:0:27:0:0:137:151
    chr13	32915005	.	G	C	.	PASS	ADP=56;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:56:56:0:56:100%:2,5602E-33:0:28:0:0:28:28
    chr13	32929387	.	T	C	.	PASS	ADP=173;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:173:173:0:173:100%:1,6275E-103:0:28:0:0:55:118
    chr13	32931852	.	T	C	.	PASS	ADP=84;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:53:84:84:43:16:26,23%:4,7113E-6:25:26:33:10:7:9
    chr13	32936646	.	T	C	.	PASS	ADP=99;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:174:99:99:49:47:47,96%:3,6959E-18:27:27:35:14:31:16
    Could you help me?
    Thank you very much
    Last edited by GenoMax; 11-03-2015, 05:01 AM. Reason: added CODE tags to improve readability
  • blancha
    Senior Member
    • May 2013
    • 367

    #2
    FREQ is not a number.
    It's a string.

    I seem to remember having encountered a similar problem, and having resolved it by converting the string to a frequency with a quick R script. So, 50% becomes 0.5.
    You should also then change the type of FREQ in the header from String to Float. SnpSift filter should then work, as you intend it to.

    In the current format, you can only test a string for equality or inequality.

    Comment

    • blancha
      Senior Member
      • May 2013
      • 367

      #3
      Another solution would be to use the VarScan filter function, which I assume can handle frequencies stored as strings.

      The frequencies really should be stored as floats in the first place though, to prevent this frustrating problem.
      It might be worth asking the developers if they can correct this "bug".

      Comment

      • pingu
        Member
        • Jul 2015
        • 26

        #4
        Thank you very much for your help. I have used perl to modify mi vcf (I have never used R )
        For example, this is the original vcf:
        Code:
        ##fileformat=VCFv4.1
        ##source=VarScan2
        ##INFO=<ID=ADP,Number=1,Type=Integer,Description="Average per-sample depth of bases with Phred score >= 15">
        ##INFO=<ID=WT,Number=1,Type=Integer,Description="Number of samples called reference (wild-type)">
        ##INFO=<ID=HET,Number=1,Type=Integer,Description="Number of samples called heterozygous-variant">
        ##INFO=<ID=HOM,Number=1,Type=Integer,Description="Number of samples called homozygous-variant">
        ##INFO=<ID=NC,Number=1,Type=Integer,Description="Number of samples not called">
        ##FILTER=<ID=str10,Description="Less than 10% or more than 90% of variant supporting reads on one strand">
        ##FILTER=<ID=indelError,Description="Likely artifact due to indel reads at this position">
        ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
        ##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
        ##FORMAT=<ID=SDP,Number=1,Type=Integer,Description="Raw Read Depth as reported by SAMtools">
        ##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Quality Read Depth of bases with Phred score >= 15">
        ##FORMAT=<ID=RD,Number=1,Type=Integer,Description="Depth of reference-supporting bases (reads1)">
        ##FORMAT=<ID=AD,Number=1,Type=Integer,Description="Depth of variant-supporting bases (reads2)">
        ##FORMAT=<ID=FREQ,Number=1,Type=String,Description="Variant allele frequency">
        ##FORMAT=<ID=PVAL,Number=1,Type=String,Description="P-value from Fisher's Exact Test">
        ##FORMAT=<ID=RBQ,Number=1,Type=Integer,Description="Average quality of reference-supporting bases (qual1)">
        ##FORMAT=<ID=ABQ,Number=1,Type=Integer,Description="Average quality of variant-supporting bases (qual2)">
        ##FORMAT=<ID=RDF,Number=1,Type=Integer,Description="Depth of reference-supporting bases on forward strand (reads1plus)">
        ##FORMAT=<ID=RDR,Number=1,Type=Integer,Description="Depth of reference-supporting bases on reverse strand (reads1minus)">
        ##FORMAT=<ID=ADF,Number=1,Type=Integer,Description="Depth of variant-supporting bases on forward strand (reads2plus)">
        ##FORMAT=<ID=ADR,Number=1,Type=Integer,Description="Depth of variant-supporting bases on reverse strand (reads2minus)">
        #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	Sample1
        chr13	32900933	.	T	A	.	PASS	ADP=278;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:278:278:131:147:52,88%:1,2935E-56:28:28:67:64:81:66
        chr13	32906729	.	A	C	.	PASS	ADP=153;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:153:153:67:86:56,21%:5,2531E-34:29:27:32:35:47:39
        chr13	32906766	.	C	T	.	PASS	ADP=153;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:153:153:67:86:56,21%:5,2531E-34:27:29:32:35:47:39
        chr13	32911888	.	A	G	.	PASS	ADP=347;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:347:347:152:194:55,91%:7,1444E-76:28:26:79:73:117:77
        chr13	32912299	.	T	C	.	PASS	ADP=381;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:381:381:198:182:47,77%:4,3258E-68:29:23:109:89:83:99
        chr13	32913055	.	A	G	.	PASS	ADP=335;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:335:335:0:335:100%:6,6246E-201:0:27:0:0:188:147
        chr13	32915005	.	G	C	.	PASS	ADP=128;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:128:128:0:127:99,22%:6,9069E-76:0:28:0:0:70:57
        chr13	32929232	.	A	G	.	PASS	ADP=432;WT=0;HET=1;HOM=0;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:432:432:210:220:50,93%:1,2685E-83:29:23:102:108:109:111
        chr13	32929387	.	T	C	.	PASS	ADP=266;WT=0;HET=0;HOM=1;NC=0	GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:266:266:0:266:100%:2,0571E-159:0:27:0:0:124:142
        And after perl:
        Code:
        ##fileformat=VCFv4.1
        ##source=VarScan2
        ##INFO=<ID=ADP,Number=1,Type=Integer,Description="Average per-sample depth of bases with Phred score >= 15">
        ##INFO=<ID=WT,Number=1,Type=Integer,Description="Number of samples called reference (wild-type)">
        ##INFO=<ID=HET,Number=1,Type=Integer,Description="Number of samples called heterozygous-variant">
        ##INFO=<ID=HOM,Number=1,Type=Integer,Description="Number of samples called homozygous-variant">
        ##INFO=<ID=NC,Number=1,Type=Integer,Description="Number of samples not called">
        ##FILTER=<ID=str10,Description="Less than 10% or more than 90% of variant supporting reads on one strand">
        ##FILTER=<ID=indelError,Description="Likely artifact due to indel reads at this position">
        ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
        ##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
        ##FORMAT=<ID=SDP,Number=1,Type=Integer,Description="Raw Read Depth as reported by SAMtools">
        ##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Quality Read Depth of bases with Phred score >= 15">
        ##FORMAT=<ID=RD,Number=1,Type=Integer,Description="Depth of reference-supporting bases (reads1)">
        ##FORMAT=<ID=AD,Number=1,Type=Integer,Description="Depth of variant-supporting bases (reads2)">
        ##FORMAT=<ID=FREQ,Number=1,Type=Float,Description="Variant allele frequency">
        ##FORMAT=<ID=PVAL,Number=1,Type=String,Description="P-value from Fisher's Exact Test">
        ##FORMAT=<ID=RBQ,Number=1,Type=Integer,Description="Average quality of reference-supporting bases (qual1)">
        ##FORMAT=<ID=ABQ,Number=1,Type=Integer,Description="Average quality of variant-supporting bases (qual2)">
        ##FORMAT=<ID=RDF,Number=1,Type=Integer,Description="Depth of reference-supporting bases on forward strand (reads1plus)">
        ##FORMAT=<ID=RDR,Number=1,Type=Integer,Description="Depth of reference-supporting bases on reverse strand (reads1minus)">
        ##FORMAT=<ID=ADF,Number=1,Type=Integer,Description="Depth of variant-supporting bases on forward strand (reads2plus)">
        ##FORMAT=<ID=ADR,Number=1,Type=Integer,Description="Depth of variant-supporting bases on reverse strand (reads2minus)">
        #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	Sample1
        chr13	32900933	.	T	A	.	PASS	ADP=278;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:278:278:131:147:0.5288:1,2935E-56:28:28:67:64:81:66
        chr13	32906729	.	A	C	.	PASS	ADP=153;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:153:153:67:86:0.5621:5,2531E-34:29:27:32:35:47:39
        chr13	32906766	.	C	T	.	PASS	ADP=153;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:153:153:67:86:0.5621:5,2531E-34:27:29:32:35:47:39
        chr13	32911888	.	A	G	.	PASS	ADP=347;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:347:347:152:194:0.5591:7,1444E-76:28:26:79:73:117:77
        chr13	32912299	.	T	C	.	PASS	ADP=381;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:381:381:198:182:0.4777:4,3258E-68:29:23:109:89:83:99
        chr13	32913055	.	A	G	.	PASS	ADP=335;WT=0;HET=0;HOM=1;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:335:335:0:335:1:6,6246E-201:0:27:0:0:188:147
        chr13	32915005	.	G	C	.	PASS	ADP=128;WT=0;HET=0;HOM=1;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:128:128:0:127:0.9922:6,9069E-76:0:28:0:0:70:57
        chr13	32929232	.	A	G	.	PASS	ADP=432;WT=0;HET=1;HOM=0;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	0/1:255:432:432:210:220:0.5093:1,2685E-83:29:23:102:108:109:111
        chr13	32929387	.	T	C	.	PASS	ADP=266;WT=0;HET=0;HOM=1;NC=0		GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR	1/1:255:266:266:0:266:1:2,0571E-159:0:27:0:0:124:142
        But I have used snpsift and file is yet empty.
        I have tried to modify "manually", the number in original vcf and I have my result.
        I do not understand why the output of my script in perl is not right.
        Thank you in advance
        Last edited by GenoMax; 11-03-2015, 05:00 AM. Reason: added CODE tags to improve readability

        Comment

        • pingu
          Member
          • Jul 2015
          • 26

          #5
          I find the problem, I made a mistake, The tabs are wrong.
          Anyway thank you!!

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM
          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Yesterday, 11:13 AM
          0 responses
          16 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, Yesterday, 10:48 AM
          0 responses
          15 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          35 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          42 views
          0 reactions
          Last Post SEQadmin2  
          Working...