Learn R Programming

hiReadsProcessor (version 1.8.2)

getSectorsForSamples: Get sectors for samples defined in the sampleInfo object.

Description

Given a sampleInfo object, the function gets the sectors for each samplename. This is an accessory function utilized by other functions of this package to aid sector retrieval.

Usage

getSectorsForSamples(sampleInfo, sector = NULL, samplename = NULL,
  returnDf = FALSE)

Arguments

sampleInfo
sample information SimpleList object, which samples per sector/quadrant information along with other metadata.
sector
a specific sector or vector of sectors if known ahead of time. Default is NULL, which extracts all sectors.
samplename
a specific sample or vector of samplenames to get sectors for. Default is NULL, which extracts all samples.
returnDf
return results in a dataframe. Default is FALSE.

Value

  • If returnDf=TRUE, then a dataframe of sector associated with each samplename, else a named list of length two: x[["sectors"]] and x[["samplenames"]]

See Also

extractSeqs, extractFeature, addFeature

Examples

Run this code
load(file.path(system.file("data", package = "hiReadsProcessor"),
"FLX_seqProps.RData"))
samples <- c('Roth-MLV3p-CD4TMLVWell6-Tsp509I',
'Roth-MLV3p-CD4TMLVWell6-MseI', 'Roth-MLV3p-CD4TMLVwell5-MuA')
getSectorsForSamples(seqProps, samplename=samples)
getSectorsForSamples(seqProps, samplename=samples, returnDf=TRUE)

Run the code above in your browser using DataLab