vcf_restartregion: Let subsequent read calls return from the start of the...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/regions.R

Description

Once the read-functions reached the end of the previously set region, no more results are returned. If, for example for a two-pass algorithm, the same region should be scanned again from the start, this function is the key.

Usage

1

Arguments

vcffh

Handle of a VCF file, as returned by vcf_open()

Details

Alternative to calling vcf_setregion() with the same parameters again. Use .Call("VCF_restartRegion", vcffh ) to eliminate the overhead of using the R wrapper function.

Value

TRUE if the region could be rewound, FALSE if not.

Author(s)

Ulrich Wittelsbuerger

See Also

vcf_setregion, vcf_open

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	##
	##	Example:
	##
	vcffile <- vcf_open( system.file( "extdata" , "ex.vcf.gz" , package="WhopGenome" ) )
	vcf_setregion(vcffile, "Y", 1, 100000 )
	
	vcf_readLineVec( vcffile )
	vcf_readLineVec( vcffile )

	vcf_restartregion( vcffile )

	vcf_readLineVec( vcffile )
	vcf_readLineVec( vcffile )

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