Filreing vcf files not giving any results
2
0
Entering edit mode
7.8 years ago
abdulbenissa ▴ 10

Okay I think I missing something here , the gVCF file I have header is

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT 
chr1    10352   .       T       TA      426     PASS    CIGAR=1M1I;IDREP=2;REFREP=1;REGION=OFFTARGET;RU=A;SF=0,1,2      GT:GQ:GQX:DPI:AD        0/1:466:13:25:11,11
chr1    14907   .       A       G       232     LowGQXHetSNP    REGION=;SF=0f,1,2;SNVHPOL=2;SNVSB=-26.4 GT:GQ:GQX:DP:DPF:AD     0/1:7:2:21:0:2,19
chr1    14930   .       A       G       241     PASS    REGION=;SF=0,1,2;SNVHPOL=2;SNVSB=-30.6  GT:GQ:GQX:DP:DPF:AD     1/1:36:19:13:0:0,13

when I run the following command I have this error or a vcf files with header and no variants :

 $> vcffilter -f "GQX > 30" A.vcf > A.filtered.vcf 
  $> vcffilter -f "DP > 10" A.vcf > A.filtered.vcf 
   $> vcffilter -f "QUAL > 30 " A.vcf > A.filtered.vcf

for example of the Error I have :

$> cannot compare (>) objects of dissimilar types
3 4

$ > Segmentation fault: 11

I know it can be done by some bash commands for example but I would like to keep the format as vcf.

vcftools vcflib gvcf • 3.0k views
ADD COMMENT
0
Entering edit mode

hi Abdul, did you solve the problem?:)

ADD REPLY
0
Entering edit mode
7.8 years ago
willgilks ▴ 360

Hi Abdul,

I don't know what program you're using but I've had a previous issue with jexel expressions like "GQX > 30" when using the GATK program. Basically, depending on what version of Linux you're using, you may have to remove the spaces, so "GQX>30", or change the speach marks, like GQX > 30 or 'GQX > 30'.

ADD COMMENT
0
Entering edit mode

I have done the changes you recommended but it give this error

$> libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string
Abort trap: 6
ADD REPLY
0
Entering edit mode

sorry SamTools has been used to call the variants I have.

ADD REPLY
0
Entering edit mode
7.8 years ago
willgilks ▴ 360

I assume you are using bcftools for the filtering. In your vcf file are there any header rows above the column names? Did it give the libc++ error message for all the commands or just the first one? GXQ is a genotype field so maybe you have to specify that with a different command option, and not -f.

If you can use GATK instead, I have some code for filtering here https://zenodo.org/record/159272 code.zip, format_hcVcf.sh with more info here https://software.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_filters_VariantFiltration.php

ADD COMMENT

Login before adding your answer.

Traffic: 2258 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6