getsnp {BinaryDosage} | R Documentation |
Read SNP data from a binary dosage file
Description
Routine to read the dosage and genetic probabilities about a SNP from a binary dosage file
Usage
getsnp(bdinfo, snp, dosageonly = TRUE)
Arguments
bdinfo |
Information about a binary dosage file return from getbdinfo |
snp |
The SNP to read the information about. This may be the SNP ID or the index of the SNP in the snps dataset in the bdinfo list |
dosageonly |
Indicator to return the dosages only or the dosages allowing with the genetic probabilities. Default value is TRUE |
Value
A list with either the dosages or the dosages and the genetic probabilities.
Examples
# Get the information about the file
vcf1abdfile <- system.file("extdata", "vcf1a.bdose", package = "BinaryDosage")
bdinfo <- getbdinfo(bdfiles = vcf1abdfile)
# Read the first SNP
getsnp(bdinfo, 1, FALSE)
[Package BinaryDosage version 1.0.0 Index]