getSeed: Extract the global random seed from a subsamples object

Description Usage Arguments Value Examples

Description

A subsamples object, or a summary.subsamples object, does not contain the subsampled count matrix at each depth (as it would take too much space and is rarely used). However, as it saves the random seed used to generate the count matrix, the count matrix at any depth can be retrieved. This can be done for a subsamples object ss by retrieving the seed with getSeed(ss). If this seed is provided to the subsample function, then the same matrices will be generated when the proportion is the same.

This is useful for adding additional methods or subsampling depths to an existing subsamples object (after which they can be combined with combineSubsamples).

Usage

1

Arguments

ss

A subsamples object, returned from the subsample function, or a summary of that object

Value

get seed of subSeq object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(hammer)

hammer.counts = Biobase::exprs(hammer)[, 1:4]
hammer.design = Biobase::pData(hammer)[1:4, ]
hammer.counts = hammer.counts[rowSums(hammer.counts) >= 5, ]

ss = subsample(hammer.counts, c(.01, .1, 1), treatment=hammer.design$protocol,
                 method=c("edgeR", "DESeq2", "voomLimma"))

seed = getSeed(ss)

StoreyLab/subSeq documentation built on June 4, 2019, 12:09 a.m.