Title: | Implementation of MultiDataSet and ResultSet |
---|---|
Description: | Implementation of the BRGE's (Bioinformatic Research Group in Epidemiology from Center for Research in Environmental Epidemiology) MultiDataSet and ResultSet. MultiDataSet is designed for integrating multi omics data sets and ResultSet is a container for omics results. This package contains base classes for MEAL and rexposome packages. |
Authors: | Carlos Ruiz-Arenas [aut, cre], Carles Hernandez-Ferrer [aut], Juan R. Gonzalez [aut] |
Maintainer: | Xavier Escrib<c3><a0> Montagut <[email protected]> |
License: | file LICENSE |
Version: | 1.35.0 |
Built: | 2024-11-19 04:01:13 UTC |
Source: | https://github.com/bioc/MultiDataSet |
eSet
to MultiDataSet
.This method adds or overwrites a slot of a MultiDataSet
with the content
of the given eSet
.
add_eset( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges )
add_eset( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges )
object |
|
set |
Object derived from |
dataset.type |
Character with the type of data of the omic set (e.g. expression, methylation...) |
dataset.name |
Character with the specific name for this set (NULL by default). It is useful when there are several sets of the same type (e.g. multiple expression assays) |
sample.tables |
Character with the names of the slots with sample data besides phenoData. |
feature.tables |
Character with the names of the slots with feature data besides featureData. |
warnings |
Logical to indicate if warnings will be displayed. |
overwrite |
Logical to indicate if the set stored in the slot will be overwritten. |
GRanges |
|
A new MultiDataSet
with a slot filled.
add_methy
, add_genexp
, add_rnaseq
, add_snps
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(10), 5)) multi <- add_eset(multi, eset, "exampledata", GRanges = NA)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(10), 5)) multi <- add_eset(multi, eset, "exampledata", GRanges = NA)
MultiDataSet
.This method adds or overwrites the slot "expression"
of an
MultiDataSet
with the content of the given ExpressionSet
. The fData of
the ExpressionSet
must contain the columns chromosome, start and end.
add_genexp(object, gexpSet, ...)
add_genexp(object, gexpSet, ...)
object |
|
gexpSet |
|
... |
Arguments to be passed to |
A new MultiDataSet
with the slot "expression"
filled.
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(4), 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr2"), start = c(12414, 1234321), end = c(121241, 124124114), stringsAsFactors = FALSE) multi <- add_genexp(multi, eset)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(4), 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr2"), start = c(12414, 1234321), end = c(121241, 124124114), stringsAsFactors = FALSE) multi <- add_genexp(multi, eset)
MultiDataSet
.This method adds or overwrites the slot "methylation"
of an
MultiDataSet
with the content of the given MethylationSet
or RatioSet
.
The fData of the input object must contain the columns chromosome and position.
add_methy(object, methySet, ...)
add_methy(object, methySet, ...)
object |
|
methySet |
|
... |
Further arguments to be passed to |
A new MultiDataSet
with the slot "methylation"
filled.
if (require(brgedata)){ multi <- createMultiDataSet() multi <- add_methy(multi, brge_methy[1:100, ]) }
if (require(brgedata)){ multi <- createMultiDataSet() multi <- add_methy(multi, brge_methy[1:100, ]) }
MultiDataSet
.This method adds or overwrites the slot "rnaseq"
of an
MultiDataSet
with the content of the given ExpressionSet
. The fData of
the ExpressionSet
must contain the columns chromosome, start and end.
add_rnaseq(object, rnaSet, ...)
add_rnaseq(object, rnaSet, ...)
object |
|
rnaSet |
|
... |
Arguments to be passed to |
A new MultiDataSet
with the slot "rnaseq"
filled.
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(4), 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr2"), start = c(12414, 1234321), end = c(121241, 12122414), stringsAsFactors = FALSE) multi <- add_genexp(multi, eset)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(4), 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr2"), start = c(12414, 1234321), end = c(121241, 12122414), stringsAsFactors = FALSE) multi <- add_genexp(multi, eset)
RangedSummarizedExperiment
to MultiDataSet
.This method adds or overwrites a slot of a MultiDataSet
with the content
of the given RangedSummarizedExperiment
.
add_rse( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE )
add_rse( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE )
object |
|
set |
Object derived from |
dataset.type |
Character with the type of data of the omic set (e.g. expression, methylation...) |
dataset.name |
Character with the specific name for this set (NULL by default). It is useful when there are several sets of the same type (e.g. multiple expression assays) |
sample.tables |
Character with the names of the slots with sample data besides colData. |
feature.tables |
Character with the names of the slots with feature data besides rowData. |
warnings |
Logical to indicate if warnings will be displayed. |
overwrite |
Logical to indicate if the set stored in the slot will be overwritten. |
A new MultiDataSet
with a slot filled.
if (require(GenomicRanges) & require(SummarizedExperiment)){ multi <- createMultiDataSet() counts <- matrix(runif(200 * 6, 1, 1e4), 200) rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)), IRanges(floor(runif(200, 1e5, 1e6)), width=100), strand=sample(c("+", "-"), 200, TRUE), feature_id=sprintf("ID%03d", 1:200)) colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3), row.names=LETTERS[1:6], id = LETTERS[1:6]) names(rowRanges) <- 1:200 rse <- SummarizedExperiment(assays=SimpleList(counts=counts), rowRanges=rowRanges, colData=colData) multi <- add_rse(multi, rse, "rseEx") }
if (require(GenomicRanges) & require(SummarizedExperiment)){ multi <- createMultiDataSet() counts <- matrix(runif(200 * 6, 1, 1e4), 200) rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)), IRanges(floor(runif(200, 1e5, 1e6)), width=100), strand=sample(c("+", "-"), 200, TRUE), feature_id=sprintf("ID%03d", 1:200)) colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3), row.names=LETTERS[1:6], id = LETTERS[1:6]) names(rowRanges) <- 1:200 rse <- SummarizedExperiment(assays=SimpleList(counts=counts), rowRanges=rowRanges, colData=colData) multi <- add_rse(multi, rse, "rseEx") }
SummarizedExperiment
to MultiDataSet
.This method adds or overwrites a slot of a MultiDataSet
with the content
of the given SummarizedExperiment
.
add_se( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges )
add_se( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges )
object |
|
set |
Object derived from |
dataset.type |
Character with the type of data of the omic set (e.g. expression, methylation...) |
dataset.name |
Character with the specific name for this set (NULL by default). It is useful when there are several sets of the same type (e.g. multiple expression assays) |
sample.tables |
Character with the names of the slots with sample data besides colData. |
feature.tables |
Character with the names of the slots with feature data besides rowData. |
warnings |
Logical to indicate if warnings will be displayed. |
overwrite |
Logical to indicate if the set stored in the slot will be overwritten. |
GRanges |
|
A new MultiDataSet
with a slot filled.
multi <- createMultiDataSet() se <- SummarizedExperiment::SummarizedExperiment(matrix(runif(10), 5)) multi <- add_se(multi, se, "exampledata", GRanges = NA)
multi <- createMultiDataSet() se <- SummarizedExperiment::SummarizedExperiment(matrix(runif(10), 5)) multi <- add_se(multi, se, "exampledata", GRanges = NA)
MultiDataSet
.This method adds or overwrites the slot "snps"
of an
MultiDataSet
with the content of the given SnpSet
. The fData of the
SnpSet
must contain the columns chromosome and position.
add_snps(object, snpSet, ...)
add_snps(object, snpSet, ...)
object |
|
snpSet |
|
... |
Arguments to be passed to |
A new MultiDataSet
with the slot "snps"
filled.
multi <- createMultiDataSet() geno <- matrix(c(3,1,2,1), ncol = 2) colnames(geno) <- c("VAL0156", "VAL0372") rownames(geno) <- c("rs3115860", "SNP1-1628854") map <- AnnotatedDataFrame(data.frame(chromosome = c("chr1", "chr2"), position = c(12414, 1234321), stringsAsFactors = FALSE)) rownames(map) <- rownames(geno) snpSet <- new("SnpSet", call = geno, featureData = map) pheno <- data.frame(id = c("VAL0156", "VAL0372")) rownames(pheno) <- c("VAL0156", "VAL0372") pData(snpSet) <- pheno multi <- add_snps(multi, snpSet)
multi <- createMultiDataSet() geno <- matrix(c(3,1,2,1), ncol = 2) colnames(geno) <- c("VAL0156", "VAL0372") rownames(geno) <- c("rs3115860", "SNP1-1628854") map <- AnnotatedDataFrame(data.frame(chromosome = c("chr1", "chr2"), position = c(12414, 1234321), stringsAsFactors = FALSE)) rownames(map) <- rownames(geno) snpSet <- new("SnpSet", call = geno, featureData = map) pheno <- data.frame(id = c("VAL0156", "VAL0372")) rownames(pheno) <- c("VAL0156", "VAL0372") pData(snpSet) <- pheno multi <- add_snps(multi, snpSet)
matrix
to MultiDataSet
.This method adds or overwrites a slot of a MultiDataSet
with the content
of the given matrix
.
add_table( object, set, dataset.type, dataset.name = NULL, warnings = TRUE, overwrite = FALSE )
add_table( object, set, dataset.type, dataset.name = NULL, warnings = TRUE, overwrite = FALSE )
object |
|
set |
|
dataset.type |
Character with the type of data |
dataset.name |
Character with the specific name for this set (NULL by default). It is useful when there are several sets of the same type. |
warnings |
Logical to indicate if warnings will be displayed. |
overwrite |
Logical to indicate if the set stored in the slot will be overwritten. |
A new MultiDataSet
with a slot filled.
multi <- createMultiDataSet() mat <- matrix(runif(12), nrow = 3) colnames(mat) <- paste0("S", 1:4) rownames(mat) <- paste0("F", 1:3) multi <- add_table(multi, mat, "exampledata")
multi <- createMultiDataSet() mat <- matrix(runif(12), nrow = 3) colnames(mat) <- paste0("S", 1:4) rownames(mat) <- paste0("F", 1:3) multi <- add_table(multi, mat, "exampledata")
Given a vector of number representing the chromosomes, convert them to string (e.g 1 to chr1). 23 is consider chrX, 24 is chrY, 25 is chrXY (probes shared between chromosomes X and Y) and 26 is chrMT.
chrNumToChar(vector)
chrNumToChar(vector)
vector |
The vector with the chromosome numbers |
A vector with the chromosomes in string format.
chromosomes <- c(1, 3, 4, 23, 15) stringChrs <- chrNumToChar(chromosomes) stringChrs
chromosomes <- c(1, 3, 4, 23, 15) stringChrs <- chrNumToChar(chromosomes) stringChrs
Get the name of the ids common to all datasets
commonIds(object)
commonIds(object)
object |
|
Character vector with the common ids.
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(9), ncol = 3)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1"), start = c(1, 5, 10),end = c(4, 6, 14), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "S2", "S3") pData(eset) <- data.frame(id = c("S1", "S2", "S3")) rownames(pData(eset)) <- c("S1", "S2", "S3") multi <- add_genexp(multi, eset, dataset.name = "g1") eset <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "G2") pData(eset) <- data.frame(id = c("S1", "G2")) rownames(pData(eset)) <- c("S1", "G2") multi <- add_genexp(multi, eset, dataset.name="g2") commonIds(multi)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(9), ncol = 3)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1"), start = c(1, 5, 10),end = c(4, 6, 14), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "S2", "S3") pData(eset) <- data.frame(id = c("S1", "S2", "S3")) rownames(pData(eset)) <- c("S1", "S2", "S3") multi <- add_genexp(multi, eset, dataset.name = "g1") eset <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "G2") pData(eset) <- data.frame(id = c("S1", "G2")) rownames(pData(eset)) <- c("S1", "G2") multi <- add_genexp(multi, eset, dataset.name="g2") commonIds(multi)
This method subsets the datasets to only contain the samples that are in all datasets. All sets will have the samples in the same order, taking into account that there can be duplicates.
commonSamples(object, unify.names = FALSE)
commonSamples(object, unify.names = FALSE)
object |
|
unify.names |
Logical indicating if sample names of the sets should be unified. |
If unify.names is TRUE, the sample names of the sets will be unified using the id column of phenodata. This option is only possible when there are no duplicated ids.
A new MultiDataSet
with only the common samples.
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(9), ncol = 3)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1"), start = c(1, 5, 10),end = c(4, 6, 14), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "S2", "S3") pData(eset) <- data.frame(id = c("S1", "S2", "S3")) rownames(pData(eset)) <- c("S1", "S2", "S3") multi <- add_genexp(multi, eset, dataset.name = "g1") eset <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "G2") pData(eset) <- data.frame(id = c("S1", "G2")) rownames(pData(eset)) <- c("S1", "G2") multi <- add_genexp(multi, eset, dataset.name="g2") commonSamples(multi)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(9), ncol = 3)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1"), start = c(1, 5, 10),end = c(4, 6, 14), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "S2", "S3") pData(eset) <- data.frame(id = c("S1", "S2", "S3")) rownames(pData(eset)) <- c("S1", "S2", "S3") multi <- add_genexp(multi, eset, dataset.name = "g1") eset <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) sampleNames(eset) <- c("S1", "G2") pData(eset) <- data.frame(id = c("S1", "G2")) rownames(pData(eset)) <- c("S1", "G2") multi <- add_genexp(multi, eset, dataset.name="g2") commonSamples(multi)
Homologous methods from limma
, getAssociation
resturns a
data.frame
with the logFC
and PValue
per
featrue for the selcted coef
and for given result (rid
).
getAssociation(object, rid = 1, coef = 2, contrast = NULL, fNames = NULL, ...)
getAssociation(object, rid = 1, coef = 2, contrast = NULL, fNames = NULL, ...)
object |
A |
rid |
The name or index of the result to be extracted. |
coef |
(default |
contrast |
(default |
fNames |
(default |
... |
Further arguments passed to topTable |
A data.frame
with the result of the association study,
including P-Value and Fold Change.
data(rset) getAssociation(rset, rid=1, fNames = c("chromosome", "position"))
data(rset) getAssociation(rset, rid=1, fNames = c("chromosome", "position"))
Implementation of Clayton's lambda score for a vector of P-Values
lambdaClayton(x, trim = 0.5)
lambdaClayton(x, trim = 0.5)
x |
Vector of P-Value |
trim |
(default |
A lambda value, indicating the inflation/deflation of the analysis.
Juan R. Gonzalez
lambdaClayton(runif(30))
lambdaClayton(runif(30))
MultiAssayExperiment
to a MultiDataSet
This function creates a MultiDataSet
using the data of a MultiAssayExperiment
.
mae2mds(MAE, warnings = TRUE)
mae2mds(MAE, warnings = TRUE)
MAE |
a |
warnings |
Logical to indicate if warnings will be displayed. |
MultiDataSet
with the of the incoming MultiAssayExperiment
.
MultiDataSet
to a MultiAssayExperiment
This function creates a MultiAssayExperiment
using the data of a MultiDataSet
.
mds2mae(MDS)
mds2mae(MDS)
MDS |
a |
MultiAssayExperiment
with the of the incoming MultiDataSet
.
Implementation of the BRGE's (Bioinformatic Research Group in Epidemiology from Center for Research in Environmental Epidemiology) MultiDataSet and MethylationSet. MultiDataSet is designed for integrating multi omics data sets and MethylationSet to contain normalized methylation data. MultiDataSet for integrating multi omics data sets
The class MultiDataSet
is a superior class to store multiple
datasets in form of triplets (assayData-phenoData-featureData). The datasets can be eSet
or
SummarizedExperiment
derived or matrices
.
## S4 method for signature 'MultiDataSet,eSet' add_eset( object, set, dataset.type, dataset.name = NULL, sample.tables = "protocolData", feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges ) ## S4 method for signature 'MultiDataSet,ExpressionSet' add_genexp(object, gexpSet, ...) ## S4 method for signature 'MultiDataSet,ExpressionSet' add_rnaseq(object, rnaSet, ...) ## S4 method for signature 'MultiDataSet,GenomicRatioSet' add_methy(object, methySet, ...) ## S4 method for signature 'MultiDataSet,RangedSummarizedExperiment' add_rse( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = "elementMetadata", warnings = TRUE, overwrite = FALSE ) ## S4 method for signature 'MultiDataSet,SummarizedExperiment' add_se( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = "elementMetadata", warnings = TRUE, overwrite = FALSE, GRanges ) ## S4 method for signature 'MultiDataSet,SnpSet' add_snps(object, snpSet, ...) ## S4 method for signature 'MultiDataSet,matrix' add_table( object, set, dataset.type, dataset.name = NULL, warnings = TRUE, overwrite = FALSE ) ## S4 method for signature 'MultiDataSet' as.list(x) ## S4 method for signature 'MultiDataSet' commonIds(object) ## S4 method for signature 'MultiDataSet' commonSamples(object, unify.names = FALSE) createMultiDataSet() ## S4 method for signature 'MultiDataSet' dims(x) ## S4 method for signature 'MultiDataSet' w_iclusterplus(object, commonSamples = TRUE, ...) ## S4 method for signature 'MultiDataSet' length(x) ## S4 method for signature 'MultiDataSet' w_mcia(object, ...) ## S4 method for signature 'MultiDataSet' names(x) ## S4 method for signature 'MultiDataSet' ncol(x) ## S4 method for signature 'MultiDataSet' nrow(x) ## S4 method for signature 'MultiDataSet' rowRangesElements(object) ## S4 method for signature 'MultiDataSet' sampleNames(object) ## S4 method for signature 'MultiDataSet' assayData(object) ## S4 method for signature 'MultiDataSet' fData(object) ## S4 method for signature 'MultiDataSet' featureData(object) ## S4 method for signature 'MultiDataSet' pData(object) ## S4 method for signature 'MultiDataSet' phenoData(object) ## S4 method for signature 'MultiDataSet' rowRanges(x) ## S4 method for signature 'MultiDataSet,ANY,ANY' x[[i]] ## S4 method for signature 'MultiDataSet,ANY,ANY,ANY' x[i, j, k, ..., drop = FALSE] ## S4 method for signature 'MultiDataSet' subset(x, feat, phe, warnings = TRUE, keep = TRUE)
## S4 method for signature 'MultiDataSet,eSet' add_eset( object, set, dataset.type, dataset.name = NULL, sample.tables = "protocolData", feature.tables = NULL, warnings = TRUE, overwrite = FALSE, GRanges ) ## S4 method for signature 'MultiDataSet,ExpressionSet' add_genexp(object, gexpSet, ...) ## S4 method for signature 'MultiDataSet,ExpressionSet' add_rnaseq(object, rnaSet, ...) ## S4 method for signature 'MultiDataSet,GenomicRatioSet' add_methy(object, methySet, ...) ## S4 method for signature 'MultiDataSet,RangedSummarizedExperiment' add_rse( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = "elementMetadata", warnings = TRUE, overwrite = FALSE ) ## S4 method for signature 'MultiDataSet,SummarizedExperiment' add_se( object, set, dataset.type, dataset.name = NULL, sample.tables = NULL, feature.tables = "elementMetadata", warnings = TRUE, overwrite = FALSE, GRanges ) ## S4 method for signature 'MultiDataSet,SnpSet' add_snps(object, snpSet, ...) ## S4 method for signature 'MultiDataSet,matrix' add_table( object, set, dataset.type, dataset.name = NULL, warnings = TRUE, overwrite = FALSE ) ## S4 method for signature 'MultiDataSet' as.list(x) ## S4 method for signature 'MultiDataSet' commonIds(object) ## S4 method for signature 'MultiDataSet' commonSamples(object, unify.names = FALSE) createMultiDataSet() ## S4 method for signature 'MultiDataSet' dims(x) ## S4 method for signature 'MultiDataSet' w_iclusterplus(object, commonSamples = TRUE, ...) ## S4 method for signature 'MultiDataSet' length(x) ## S4 method for signature 'MultiDataSet' w_mcia(object, ...) ## S4 method for signature 'MultiDataSet' names(x) ## S4 method for signature 'MultiDataSet' ncol(x) ## S4 method for signature 'MultiDataSet' nrow(x) ## S4 method for signature 'MultiDataSet' rowRangesElements(object) ## S4 method for signature 'MultiDataSet' sampleNames(object) ## S4 method for signature 'MultiDataSet' assayData(object) ## S4 method for signature 'MultiDataSet' fData(object) ## S4 method for signature 'MultiDataSet' featureData(object) ## S4 method for signature 'MultiDataSet' pData(object) ## S4 method for signature 'MultiDataSet' phenoData(object) ## S4 method for signature 'MultiDataSet' rowRanges(x) ## S4 method for signature 'MultiDataSet,ANY,ANY' x[[i]] ## S4 method for signature 'MultiDataSet,ANY,ANY,ANY' x[i, j, k, ..., drop = FALSE] ## S4 method for signature 'MultiDataSet' subset(x, feat, phe, warnings = TRUE, keep = TRUE)
object |
|
set |
Object derived from |
dataset.type |
Character with the type of data of the omic set (e.g. expression, methylation...) |
dataset.name |
Character with the specific name for this set (NULL by default). It is useful when there |
sample.tables |
Character with the names of the slots with sample data besides phenoData. |
feature.tables |
Character with the names of the slots with feature data besides featureData. |
warnings |
Logical to indicate if warnings will be displayed. |
overwrite |
Logical to indicate if the set stored in the slot will be overwritten. |
GRanges |
|
gexpSet |
|
... |
Further arguments passed to add_rse or add_se |
rnaSet |
|
methySet |
|
snpSet |
|
x |
|
unify.names |
Logical indicating if sample names of the sets should be unified. |
commonSamples |
Logical to indicate if common samples are selected |
i |
Character corresponding to selected sample names. They should match the id column of phenoData. |
j |
Character with the name of the selected tables. |
k |
|
drop |
If TRUE, sets with no samples or features will be discarded |
feat |
Logical expression indicating features to keep |
phe |
Logical expression indicating the phenotype of the samples to keep |
keep |
If FALSE, sets where the expression cannot be evaluated will be discarded. |
The names of the three lists (assayData
, phenoData
and
featureData
) must be the same.
MultiDataSet
MultiDataSet
add_eset
: Method to add an eSet
to MultiDataSet
.
add_genexp
: Method to add a slot of expression to MultiDataSet
.
add_rnaseq
: Method to add a slot of (RNASeq) expression to MultiDataSet
.
add_methy
: Method to add a slot of methylation to
MultiDataSet
from a GenomicRatioSet
.
add_rse
: Method to add a RangedSummarizedExperiment
to MultiDataSet
.
add_se
: Method to add a SummarizedExperiment
to MultiDataSet
.
add_snps
: Method to add a slot of SNPs to MultiDataSet
.
add_table
: Method to add a matrix
to MultiDataSet
.
as.list
: Returns a list with the first matrix of each
dataset.
commonIds
: Get the name of the ids common to all datasets
commonSamples
: Get a MultiDataSet only with the samples present in all the tables
dims
: Returns the dimensions of the sets
w_iclusterplus
: Apply iClusterPlus clustering method to a MultiDataSet object
length
: Returns the number of sets into the object.
w_mcia
: Apply mcia integration method to a MultiDataSet object
names
: Get the names of the slots.
ncol
: Get number of samples of each set
nrow
: Get number of features of each set
rowRangesElements
: Get the name of the datasets that have rowRanges
sampleNames
: Get sample names
assayData
: Retrieve all assay data blocks.
fData
: Retrieve information on features.
featureData
: Retrieve information on features.
pData
: Retrieve information on experimental phenotypes
phenoData
: Retrieve information on experimental phenotypes
rowRanges
: Retrieve information on feature ranges.
[[
: Get a set from a slot
[
: Subset a MultiDataSet
subset
: Filter a subset using feature ids or phenotypes
assayData
List of assayData
elements.
phenoData
List of AnnotatedDataFrame
containing the phenoData
of each assayData
.
featureData
List of AnnotatedDataFrame
containing the featureData
of each assayData
.
rowRanges
List of GenomicRanges
containing the rowRanges
of each assayData
.
extraData
List of other slots of the original object.
return_method
List of functions used to create the original object.
createMultiDataSet()
createMultiDataSet()
Method that returns a list with the options used to create the
ResultSet
.
opt(object)
opt(object)
object |
A |
A list with the options used to create the ResultSet
.
data(rset) opt(rset)
data(rset) opt(rset)
Function to draw a QQ Plot from a vector of numbers
qq_plot(values, show.lambda = TRUE)
qq_plot(values, show.lambda = TRUE)
values |
Numeric vector of P.Values |
show.lambda |
(default: |
An object obtained from ggplot.
data(rset) rst <- getAssociation(rset, rid = 1, fNames = NULL) qq_plot(rst$P.Value)
data(rset) rst <- getAssociation(rset, rid = 1, fNames = NULL) qq_plot(rst$P.Value)
Class ResultSet
used to encapsulate results from MEAL
and
omicrexposome
.
## S4 method for signature 'ResultSet' fData(object) ## S4 method for signature 'ResultSet' getAssociation(object, rid = 1, coef = 2, contrast = NULL, fNames = NULL, ...) ## S4 method for signature 'ResultSet' length(x) ## S4 method for signature 'ResultSet' names(x) ## S4 method for signature 'ResultSet' opt(object) ## S4 method for signature 'ResultSet,ANY' plot( x, y, rid = 1, coef = 2, contrast = NULL, type, tFC = 2, tPV = -log10(0.001), show.labels = TRUE, show.effect = FALSE, show.lambda = TRUE, fNames = c("chromosome", "start"), subset, highlight, ... ) ## S4 method for signature 'ResultSet' varLabels(object) create_resultset(fOrigin, lResults, fData, lOptions = list())
## S4 method for signature 'ResultSet' fData(object) ## S4 method for signature 'ResultSet' getAssociation(object, rid = 1, coef = 2, contrast = NULL, fNames = NULL, ...) ## S4 method for signature 'ResultSet' length(x) ## S4 method for signature 'ResultSet' names(x) ## S4 method for signature 'ResultSet' opt(object) ## S4 method for signature 'ResultSet,ANY' plot( x, y, rid = 1, coef = 2, contrast = NULL, type, tFC = 2, tPV = -log10(0.001), show.labels = TRUE, show.effect = FALSE, show.lambda = TRUE, fNames = c("chromosome", "start"), subset, highlight, ... ) ## S4 method for signature 'ResultSet' varLabels(object) create_resultset(fOrigin, lResults, fData, lOptions = list())
object |
A |
rid |
Name or index of the internal result to be used |
coef |
Coefficient to be returne, usually 2 |
contrast |
Numeric matrix with the contrasts used to perform the analyses |
fNames |
Character vector with the names of the fData columns that will be added to the results data.frame. |
... |
Further arguments passed to topTable |
x |
A |
y |
- |
type |
Type of plot to be drawn |
tFC |
Threshold for log FC of effect |
tPV |
Threshold for P-Value |
show.labels |
(default |
show.effect |
(default: |
show.lambda |
(default: |
subset |
GenomicRanges used to zoom a region in Manhattan plot |
highlight |
GenomicRanges used to highlight a region in Manhattan plot |
fOrigin |
Chracter with the function used to run the analysis. |
lResults |
List with the results |
fData |
List with the feature data. |
lOptions |
List with additional options |
An object of class ResultSet
fData
: Returns data.frame
with feature's data.
getAssociation
: Getter to obtain the raw data.frame
from
association and integration analysis.
length
: Returns the amoung of analyses stored in the
ResultSet
.
names
: Returns the names of the omics data used to create
the ResultSet
.
opt
: Returns a list with the options used to create the
ResultSet
plot
: Allows to plot a series of plots (QQ plot, Manhattan
plot and Volcano plot) depending on the results stored in the
ResultSet
.
varLabels
: Returns the names of the variables of the models used in
a ResultSet
.
fun_origin
Character containing the function that creates the object.
results
List containing the results of the association/integration.
fData
List containing the feature-data of the original objects.
options
list of options used to create the ResultSet
.
create_resultset("hello", list(), list(), list())
create_resultset("hello", list(), list(), list())
Get the name of the datasets that have rowRanges
rowRangesElements(object)
rowRangesElements(object)
object |
|
Character vector with the slots that have rowRanges.
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(10), 5)) eset2 <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset2) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) multi <- add_eset(multi, eset, "exampledata", GRanges = NA) multi <- add_genexp(multi, eset2) rowRangesElements(multi)
multi <- createMultiDataSet() eset <- new("ExpressionSet", exprs = matrix(runif(10), 5)) eset2 <- new("ExpressionSet", exprs = matrix(runif(8), ncol = 2)) fData(eset2) <- data.frame(chromosome = c("chr1", "chr1", "chr1", "chr1"), start = c(1, 14, 25, 104),end = c(11, 16, 28, 115), stringsAsFactors = FALSE) multi <- add_eset(multi, eset, "exampledata", GRanges = NA) multi <- add_genexp(multi, eset2) rowRangesElements(multi)
ResultSet
Example ResultSet
used in the functions examples and in the tests. The
script used to generate it can be found in inst/scripts.
rset
rset
ResultSet
Function that takes two numeric vectors (P-Value and fold change)
and draws a volcano plot using ggplot2
volcano_plot( pval, fc, names, size = 2, tFC = 2, tPV = -log10(0.001), show.labels = TRUE, show.effect = FALSE )
volcano_plot( pval, fc, names, size = 2, tFC = 2, tPV = -log10(0.001), show.labels = TRUE, show.effect = FALSE )
pval |
numeric vector of P.Values |
fc |
numeric vector of fold change |
names |
character vector with the feature's names. |
size |
(default |
tFC |
(default |
tPV |
(default |
show.labels |
(default |
show.effect |
(default |
A ggplot
object
data(rset) w1 <- getAssociation(rset, rid = 1, fNames = NULL) volcano_plot(w1$P.Value, w1$logFC, rownames(w1))
data(rset) w1 <- getAssociation(rset, rid = 1, fNames = NULL) volcano_plot(w1$P.Value, w1$logFC, rownames(w1))
Method iClusterPlus is applied on a MultiDataSet object after getting the common samples along all the contained datasets.
w_iclusterplus(object, commonSamples = TRUE, ...)
w_iclusterplus(object, commonSamples = TRUE, ...)
object |
|
commonSamples |
Logical to indicate if common samples are selected |
... |
Arguments passed to function iClusterPlus |
A list of results from iClusterPlus
Argument type
for iClusterPlus is filled within the method.
Method mcia is applied on a MultiDataSet object after getting the common samples along all the contained datasets.
w_mcia(object, ...)
w_mcia(object, ...)
object |
|
... |
Arguments passed to function mcia |
A list of results from mcia