makeRA | R Documentation |
Function which creates an RA object from inputs of count matrices of reference and alternate alleles.
makeRA(ref, alt, indID, chrom = NULL, pos = NULL, sampthres = 0.01)
ref |
Matrix of non-negative counts of reference alleles. Number of rows correspond to the number of samples. Number of columns correspond to the number of SNPs. |
alt |
Matrix of non-negative counts of alternate alleles. Number of rows correspond to the number of samples. Number of columns correspond to the number of SNPs. |
indID |
Vector of IDs for samples. Needs to have the same length as the number of rows in 'ref' and 'alt' arguments. Note: Duplicate IDs will be merged into one sample. |
chrom |
Vector of chromosome numbers. Needs to have the same length as the number of columns in 'ref' and 'alt' arguments. If 'NULL', then each SNP is given a random unique chromsome number. |
pos |
Vector of SNP positions. Needs to have the same length as the number of columns in 'ref' and 'alt' arguments. If 'NULL', then each SNP is given a random unique positi number. |
sampthres |
A numeric value giving the filtering threshold for which individual samples are removed. Default is 0.01 which means that samples with an average number of reads per SNP that is less than 0.01 are removed. |
An R6 object of class RA.
Timothy P. Bilton
## Load data from package
datloc = system.file("extdata", "simdata.Rdata", package = "GUSbase")
load(datloc)
## Create RA object from the data
makeRA(ref, alt, indID, chrom, pos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.