The -i and -e options are complementary and choosing one or the other allows you to include / exclude records without the tag. In your case, this should work:
bcftools view -e'AF>0.99' petr On Mon, 2014-11-03 at 15:28 +0100, Tim Hughes wrote: > Hi, > > > My VCF file is annotatated with g1k frequency when such a frequency is > available. > > > I want to select all variants with a frequency below a certain cutoff > say 1%. Thus I want all lines where this condition is satisfied BUT I > also need all the lines where there is no frequency annotation. > > > Does anyone know how to do this? I have tried but it would seem like > bcftools does not provide a way of testing whether a tag is present in > the INFO field. > > > Tim > > > -- > Tim Hughes PhD > Medical Genetics Department > Oslo University Hospital (UllevÄl) > Kirkeveien 166 > 0407 Oslo > Norway > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Samtools-help mailing list > Samtools-help@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/samtools-help -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. ------------------------------------------------------------------------------ _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help