Description Usage Arguments Details Value Author(s) See Also Examples
Reads all data in the currently selected region of the given VCF file and counts how many loci with SNPs or biallelics SNPs respectively, are encountered.
1 2 | vcf_countSNPs( vcffh )
vcf_countBiallelicSNPs( vcffh )
|
vcffh |
Handle to a VCF file, as returned by vcf_open |
For certain cases, like pre-allocating variables, it can be useful to know how many SNPs are present in a certain region. In order to reduce the effort of this task and its impact on runtime to a minimum, the functions vcf_countSNPs and vcf_countBiallelicSNPs were implemented. Take note that they do not automatically 'restart' from the beginning of the selected region but continue from the current position. Use vcf_restartregion to make sure that all SNPs in the currently set region are counted.
An integer number is returned: the number of SNPs or biallelic SNPs.
Ulrich Wittelsbuerger
vcf_restartregion
1 2 3 4 5 6 7 8 | ##
## Example:
##
vcffile <- system.file( "extdata" , "ex.vcf.gz" , package="WhopGenome" )
vcffile
vcffh <- vcf_open( vcffile )
vcffh
vcf_countSNPs( vcffh )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.