Learn R Programming

WhopGenome (version 0.9.4)

vcf_getregion: Get description of currently selected chromosomal region.

Description

Returns a textual description like 'chr3:10913000-20240100' representing the genomic range which is currently set.

Usage

vcf_getregion( vcffh )

Arguments

vcffh
Handle to the VCF for which the currently active region should be retrieved

Value

NULL if vcffh is not a valid VCF filehandle as returned by vcf_open. Otherwise, a region string.

Details

Returns the string describing the region which is currently set for the given VCF file. The string has the form ":-", e.g. "1:120300-130500", where "1" is the identifier of the chromosome or contig stored in the file, 120300 is the leftmost position in the sequence for which we want to get variation data and 130500 is the rightmost position. Because usually there is no variation data for every position, there is no guarantee that the first reported SNP will be at position 120300. Initially, before a region has been set by the user, the returned string is ":0-0".

Examples

Run this code
	vcffile <- vcf_open( system.file( "extdata", "ex.vcf.gz" , package="WhopGenome") )
	vcf_getregion( vcffile )

Run the code above in your browser using DataLab