|
From: Sébastien L. <seb...@in...> - 2014-05-20 12:54:10
|
Great, that fit my needs. I saw that 'FORMAT' is not recognized, only 'FMT'. I just mention it, because the doc page says that we could use both. I could make my complex filter. Thanks, Sébastien L. Le 20-05-2014 13:15, Petr Danecek a écrit : > Ah, I am sorry, I pointed you in a wrong direction. It is the "filter" > command which can set the genotypes to missing > > bcftools filter -S. -e'EXPRESSION' > > Petr > > > On Tue, 2014-05-20 at 11:27 +0200, Sébastien Letort wrote: >> Thanks Petr for your information. >> My version of bcftools was outdated. >> >> Nevertheless, I didn't succeed. >> >> `bcftools annotate -x FORMAT/DP` seems to be designed to remove all DP >> format values. >> >> I tried 'FORMAT/DP<100' to remove DP when DP < 100 and that's not the >> way do do this. >> >> I need something clause to : >> for s in samples >> do >> if( s.DP<100 || s.SRR/s.SRF <0.8 ) >> then >> s = '.' >> fi >> done >> >> Maybe what I want is to complex, should I try to write a plugin ? >> I did not find documentation on it. >> >> Best, >> Sébastien L. >> >> Le 19-05-2014 09:31, Petr Danecek a écrit : >> > Hi Sebastien, >> > >> > `bcftools annotate` can do what you want via the -x option >> > >> > Best, >> > Petr >> > >> > >> > On Fri, 2014-05-16 at 10:47 +0200, Sébastien Letort wrote: >> >> Hi, >> >> >> >> I need to remove some sample genotypes of my VCF file regarded their >> >> attributes. >> >> >> >> Here is a row starting with FORMAT field. >> >> >> >> GT:FAO:FSAR:SAR:AO:SRF:FSRF:SAF:DP:GQ:FRO:SRR:RO:FDP:FSAF:FSRR . >> >> 0/1:7:6:4:5:20:21:1:32:12:27:5:25:34:1:6 . . >> >> >> >> I need to change sample value with '.' when one attribute doesn't >> >> reach >> >> a threshold for example "AO > 10" >> >> or when a more complicated test fail like : "0.9 < SRR/SRF && SRR/SRF >> >> < >> >> 1.1" >> >> >> >> I check vcf-annotate, but it doesn't seem to manage the complexe test. >> >> >> >> Can you confirm me that nothing exist to do this task ? >> >> I can use Vcf.pm if nothing else already exist. >> >> >> >> >> >> regards, -- Sébastien Letort - bio-informaticien Inserm U1078, Génétique, Génomique fonctionnelle et Biotechnologies 46 rue Félix Le Dantec CS 51819 29218 BREST CEDEX 2 Tel. 02.98.22.34.08 (EFS) Tel. 02.98.01.82.37 (UBO) |