getgenotypes_R | R Documentation |
This function calls the C++ function that does all the heavy lifting. It passes the locus_index and the locus_offset in the unified_genotype_table from the markers_arg argument. It also gathers other data.frames that are in the "global" ENV environment. One frame contains a bit vector of compressed genotype information, another contains the alleles for each marker, and finally there are some bookkeeping related data. Note this function is for Testing only and is not exported.
getgenotypes_R(markers_arg, sepstr = "", envir = ENV)
markers_arg |
a data.frame with the following 5 observations:
|
sepstr |
separator string for alleles (default is none) |
envir |
an environment that contains all the data frames created from the SQLite database. |
The unified_genotype_table contains one raw vector for each person. In the vector there are two bits for each genotype. This function creates an output matrix by selecting from each row all the needed markers and then repeating for each person.
a matrix of genotypes represented as a nucleotide pair. There is one column for each marker in markers_arg argument. There is one row for each person in the family (fam) table.
## Not run:
# genotypes for all persons in markers data.frame argument
getgenotypes_R(ENV$markers)
# genotypes for all persons in chromosome n
getgenotypes_R(ENV$markers[ENV$markers$chromosome == n,])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.