sliceFileSet: Slice a fileSet with samples and probes

Description Usage Arguments Value Examples

View source: R/fileSet.R

Description

Slice a fileSet with samples and probes

Usage

1
sliceFileSet(fset, samples = fset$samples, probes = fset$probes, memmax = 10^5)

Arguments

fset

a sesame::fileSet, as obtained via readFileSet

samples

samples to query (default to all samples)

probes

probes to query (default to all probes)

memmax

maximum items to read from file to memory, to protect from accidental memory congestion.

Value

a numeric matrix of length(samples) columns and length(probes) rows

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## create two samples
fset <- initFileSet('mybetas2', 'HM27', c('s1','s2'))

## a hypothetical numeric array (can be beta values, intensities etc)
hypothetical <- setNames(runif(fset$n), fset$probes)

## map the numeric to file
mapFileSet(fset, 's1', hypothetical)

## get data
sliceFileSet(fset, 's1', 'cg00000292')

sesame documentation built on Nov. 15, 2020, 2:08 a.m.