vcf_getChrom: Return a specific piece of information from the last line...

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

View source: R/read_simple.R

Description

Return a specific piece of information from the last line processed with vcf_parseNextSNP or vcf_parsenextline.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	vcf_getChrom( vcffh )
	vcf_getPos( vcffh )
	vcf_getID( vcffh )
	vcf_getRef( vcffh )
	vcf_getAlt( vcffh )
	vcf_getQual( vcffh )
	vcf_getFilter( vcffh )
	vcf_getInfo( vcffh )
	vcf_getInfoField( vcffh, fieldnam )
	vcf_getFormat( vcffh )
	vcf_getSample( vcffh, stridx )

Arguments

vcffh

VCF file handle

fieldnam

Name of a key of the key-value-pairs stored in the INFO subfield

stridx

Name of a sample

Details

Use .Call("VCF_getChrom", filename ) to eliminate the overhead of using the R wrapper function. Replace getChrom by getPos, getID, getRef, getAlt, getQual, getFilter, getInfo, getInfoField, getSample and add the respective function arguments in the order given above to call the respective other function.

Value

None if the call failed, otherwise the respective data from the last read line is extracted.

Author(s)

Ulrich Wittelsbuerger

See Also

vcf_isSNP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
	##
	##	Example:
	##
	vcffile <- vcf_open( system.file( "extdata", "ex.vcf.gz" , package="WhopGenome") )
	vcf_parseNextSNP( vcffile )
	vcf_getChrom( vcffile )
	vcf_getPos( vcffile )
	vcf_getID( vcffile )
	vcf_getAlt( vcffile )
	vcf_getQual( vcffile )
	vcf_getFilter( vcffile )
	vcf_getInfoField( vcffile, "AA" )

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