Description Usage Arguments Details Value See Also Examples
View source: R/vcfR2SnpMatrix.R
Convert a vcfR-class
object into a list composed of genetic distances, subject IDs, and a SnpMatrix-class
/XSnpMatrix-class
object.
1 | vcfR2SnpMatrix(obj, phased = NULL, subjects = NULL)
|
obj |
An instance or path of the |
phased |
If |
subjects |
A character or factor containing subject IDs. If supplied, genotype info of only those subjects will be returned. This should be a subset of the sample IDs in the vcfR object. |
In order to let vcfR2SnpMatrix
function properly, the input vcfR-class
object is expected to be generated from a valid VCF file which contains only biallelic SNPs and includes a GT section.
A list which contains the following components:
genetic.distances |
A numeric vector of the reference positions of SNPs. |
subjectID |
A character vector of IDs of the subjects which the returned genotype data belong to. |
data |
An object of |
read.vcfR
, SnpMatrix-class
, XSnpMatrix-class
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.