$mergeSamples | R Documentation |
Method for merging read count information from multiple samples in an RA object
The main argument is samID
which expects a character vector (length equal to the number of individuals in
the dataset) where the enteries correspond to the sample IDs. Enteries in samID
that are identical
result in the corresponding samples being merged. See the examples for an illustration.
RAobj$mergeSamples(samID, useID=TRUE)
Character vector:
Logical: If TRUE
, the values in samID
are used. Otherwise, the original sample
IDs in the RA object are used.
Timothy P. Bilton
RA
## Load simulated dataset with GUSbase into R
file <- simDS()
RAfile <- VCFtoRA(file$vcf)
subset <- readRA(RAfile, snpsubset = 10:30)
## create new sample ID vector
samID = substr(ra$.__enclos_env__$private$indID, 1, 2) ## sample IDs from RA object
samID[5:104] = paste0(samID[5:104],"_", 1:100)
head(samID) # will merge first row with third and second row with fourth row
## merge samples
subset$mergeSamples(samID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.