Learn R Programming

iDOS (version 1.0.0)

estimate.null.distribution.correlation: estimate.null.distribution.correlation

Description

Function to estimate probability of observing correlations as high as observed using a feature list of interest

Usage

estimate.null.distribution.correlation( exp.data = NULL, cna.data.log2 = NULL, corr.threshold = 0.3, corr.direction = "two.sided", subtypes.metadata = NULL, feature.ids = NULL, observed.correlated.features = NULL, iterations = 50, cancer.type = NULL, data.dir = NULL )

Arguments

exp.data
Feature by sample mRNA abundance matrix
cna.data.log2
Feature by sample CNA log ratio matrix
corr.threshold
Threshold for Spearman's Rho to consider a feature as candidate driver
corr.direction
Whether to include positively (greater), negatively (less) or both (two.sided) correlated features. Defaults to two.sided
subtypes.metadata
Subtypes metadata list. Contains at least subtype specific samples
feature.ids
Vector of features to be used to estimate correlation
observed.correlated.features
List of features that were found to be correlated for subtypes of a given cancer type
iterations
Number of random permutations for estimating p value
cancer.type
Name of the cancer type or dataset
data.dir
Path to output directory where the randomisation results will be stored

Value

1 if successful

See Also

estimate.expression.cna.correlation

Examples

Run this code

# load test data
x <- get.test.data(data.types = c("mRNA.T", "CNA"));

# temporary output directory
tmp.output.dir <- tempdir();

# estimate mRNA and CNA correlation for each cancer/disease type
correlated.features <- estimate.expression.cna.correlation(
  exp.data = x$mRNA.T$BLCA, 
  cna.data.log2 = x$CNA.log2$BLCA, 
  corr.threshold = 0.3, 
  corr.direction = "two.sided", 
  subtypes.metadata = list(
    "subtype.samples.list" = list("All" = colnames(x$mRNA.T$BLCA))
    ), 
  feature.ids = rownames(x$mRNA.T$BLCA), 
  cancer.type = "BLCA", 
  data.dir = paste(tmp.output.dir, "/data/BLCA/", sep = ""),
  graphs.dir = paste(tmp.output.dir, "/graphs/BLCA/", sep = "")
  );

# estimate NULL distribution
estimate.null.distribution.correlation(
  exp.data = x$mRNA.T$BLCA,
  cna.data.log2 = x$CNA.log2$BLCA, 
  corr.threshold = 0.3, 
  corr.direction = "two.sided", 
  subtypes.metadata = list(
    "subtype.samples.list" = list("All" = colnames(x$mRNA.T$BLCA))
    ), 
  feature.ids = rownames(x$mRNA.T$BLCA), 
  observed.correlated.features = correlated.features$correlated.genes.subtypes, 
  iterations = 50, 
  cancer.type = "BLCA", 
  data.dir = paste(tmp.output.dir, "/data/BLCA/", sep = "")
  );

Run the code above in your browser using DataLab