cash-mergeSamples: RA Method: Merge samples in an RA object

$mergeSamplesR Documentation

RA Method: Merge samples in an RA object

Description

Method for merging read count information from multiple samples in an RA object

Details

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.

Usage

RAobj$mergeSamples(samID, useID=TRUE)

Arguments

samID

Character vector:

useID

Logical: If TRUE, the values in samID are used. Otherwise, the original sample IDs in the RA object are used.

Author(s)

Timothy P. Bilton

See Also

RA

Examples

## 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)


tpbilton/GUSbase documentation built on March 8, 2024, 1:35 p.m.