addCorrelation.R: Correlation, old version

Description Usage Arguments Details Value Note See Also Examples

Description

Correlation, old version

Usage

1
2
3
addCorrelation.R(obj, method = "pearson", subset.miRNA = obj@sig.miRNA,
 subset.mRNA = obj@sig.mRNA, common = NULL, d.influences = FALSE,
 alternative = "two.sided")

Arguments

obj

a corObject.

method

method used for computing correlation: "pearson" or "spearman".

subset.miRNA

Optional, character vector with the names of the miRNAs to correlate. It is recommended that miRNAs are added using addSig function.

subset.mRNA

Optional, character vector with the names of the mRNAs to correlate. It is recommended that mRNAs are added using addSig function.

common

Optional, character vector with the names of the samples to correlate (the samples must appear in both miRNA and mRNA datasets.)

d.influences

compute a matrix with the Cook's Distance of each sample in each miRNA-mRNA correlatio.

alternative

specification of the alternative hypothesis: "less" (default), "two-sided" or "greater".

Details

A more complete version of the addCorrelation function, but significantly slower (specially kendall correlation). Use always addCorrelation function whenever it is possible.

If d.influences = TRUE, a 3-dimension matrix is added to the info slot, labeled "influenting.sample". First dimension: miRNA names; second dimension: mRNA names; third dimension: sample names; fill: Cook's Distance for a specific sample in a specific miRNA-mRNA linear regression (defined by the dimension label-names).

Value

A corObject with the slots "cor" and "pval" filled. Optionally, a matrix named "influenting.sample" is added to the info slot.

Note

This function can take a long time to complete when is applied to large datasets.

See Also

corObject-class,cor, addCorrelation, addSig, cooks.distance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(data.obj)

data.obj<-addSig(data.obj,"miRNA",manual=c("hsa-let-7c","hsa-miR-122"))
data.obj<-addSig(data.obj,"mRNA",manual=c("A1BG","A1CF"))


data.obj.correlated<-addCorrelation.R(data.obj, method="pearson", alternative="less",
 d.influences=TRUE)

data.obj.correlated@cor
data.obj.correlated@pval
data.obj.correlated@info[["influenting.sample"]]

mariavica/mircomb documentation built on Feb. 3, 2020, 2:28 a.m.