Description Usage Arguments Details Value See Also Examples
Utility function to run CBS's three functions on one or more samples
1 2 3 |
data |
numeric matrix with continuous data in one or more columns |
locs |
GenomicRanges, like rowRanges slot of GenoSet |
return.segs |
logical, if true list of segment data.frames return, otherwise a DataFrame of Rle vectors. One Rle per sample. |
n.cores |
numeric, number of cores to ask mclapply to use |
smooth.region |
number of positions to left and right of individual positions to consider when smoothing single point outliers |
outlier.SD.scale |
number of SD single points must exceed smooth.region to be considered an outlier |
smooth.SD.scale |
floor used to reset single point outliers |
trim |
fraction of sample to smooth |
alpha |
pvalue cutoff for calling a breakpoint |
Takes care of running CBS segmentation on one or more samples. Makes appropriate input, smooths outliers, and segment
data frame of segments from CBS
Other 'segmented data': bounds2Rle
,
rangeSegMeanLength
,
segPairTable
, segTable
,
segs2Granges
,
segs2RleDataFrame
, segs2Rle
1 2 3 4 5 6 7 8 9 10 11 12 13 | sample.names = paste('a',1:2,sep='')
probe.names = paste('p',1:30,sep='')
ds = matrix(c(c(rep(5,20),rep(3,10)),c(rep(2,10),rep(7,10),rep(9,10))),ncol=2,dimnames=list(probe.names,sample.names))
locs = GRanges(ranges=IRanges(start=c(1:20,1:10),width=1,names=probe.names),seqnames=paste('chr',c(rep(1,20),rep(2,10)),sep=''))
seg.rle.result = RleDataFrame( a1 = Rle(c(rep(5,20),rep(3,10))), a2 = Rle(c(rep(2,10),rep(7,10),rep(9,10))), row.names=probe.names )
seg.list.result = list(
a1 = data.frame( ID=rep('a1',2), chrom=factor(c('chr1','chr2')), loc.start=c(1,1), loc.end=c(20,10), num.mark=c(20,10), seg.mean=c(5,3), stringsAsFactors=FALSE),
a2 = data.frame( ID=rep('a2',3), chrom=factor(c('chr1','chr1','chr2')), loc.start=c(1,11,1), loc.end=c(10,20,10), num.mark=c(10,10,10), seg.mean=c(2,7,9), stringsAsFactors=FALSE)
)
runCBS(ds,locs) # Should give seg.rle.result
runCBS(ds,locs,return.segs=TRUE) # Should give seg.list.result
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.