vcf_rule.disable: Disable and enable processing of a rule

Description Usage Arguments Details Value Author(s) Examples

View source: R/filter.R

Description

Filtering rules can be enabled and disabled. Disabled rules are ignored by any filtering VCF read function.

Usage

1
2
vcf_rule.disable( vcffh, ruleidx )
vcf_rule.enable( vcffh, ruleidx )

Arguments

vcffh

VCF file handle

ruleidx

number of rule

Details

Certain VCF read functions support the fast pre-filtering mechanism of WhopGenome. The pre-filtering mechanism is a list of rules that describe how and what to check in SNP descriptions and is executed very quickly without using any R code. Every rule specifies the column of data (e.g. INFO, POS, FILTER), the key in the column (e.g. AF in the INFO column), the type of comparison , reference values to compare against and whether to keep or drop the line if the rule matches.

Value

TRUE if succeeded, FALSE if not

Author(s)

Ulrich Wittelsbuerger

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
	##
	##	Example:
	##
	vcffile <- vcf_open( system.file( "extdata" , "ex.vcf.gz" , package="WhopGenome" ) )
	vcf_setregion(vcffile, "Y", 1, 100000 )
	vcf_addfilter( vcffile, "POS", "", "INT_CMP_OO",
					as.integer(49005), as.integer(49007), "DROP" )
	vcf_describefilters( vcffile )
	vcf_readLineVecFiltered( vcffile )

	vcf_rule.disable( vcffile, 0 )
	vcf_describefilters( vcffile )
	vcf_restartregion( vcffile )
	vcf_readLineVecFiltered( vcffile )

WhopGenome documentation built on May 1, 2019, 10:12 p.m.