GenoSet {genoset} | R Documentation |
This function is the preferred method for creating a new GenoSet object. Currently, a GenoSet is simply a RangedSummarizedExperiment with some API changes and extra methods. Therefore, a GenoSet must always have a rowRanges.
GenoSet(rowRanges, assays, colData, metadata = list()) ## S4 method for signature 'GenoSet' lengths(x)
rowRanges |
GenomicRanges, not a GenomicRangesList |
assays |
list, SimpleList or matrix-like object |
colData |
a data.frame or DataFrame of sample metadata with rownames matching the colnames of the matrices in assays |
metadata |
a list of any other data you want to attach to the GenoSet object |
x |
A GenoSet |
locations. Rownames are required to match featureNames.
A GenoSet object
test.sample.names = LETTERS[11:13] probe.names = letters[1:10] assays=list(matrix(31:60,nrow=10,ncol=3,dimnames=list(probe.names,test.sample.names))) rowRanges=GRanges(ranges=IRanges(start=1:10,width=1,names=probe.names),seqnames=c(rep('chr1',4),rep('chr3',2),rep('chrX',4))) colData=data.frame(matrix(LETTERS[1:15],nrow=3,ncol=5,dimnames=list(test.sample.names,letters[1:5]))) rse=SummarizedExperiment(rowRanges=rowRanges,assays=assays,colData=colData,metadata=metadata) gs = GenoSet(rowRanges, assays, colData)