negative_cor: Find the correlation coefficient between each gene and miRNA.

Description Usage Arguments Value See Also Examples

View source: R/negative_cor.R

Description

This function will calculate the correlation coefficient between each gene and miRNA from differential expressed data, which are produced by differExp_discrete or differExp_continuous. After filtering the positive and higher than cutoff value of correlation, this function would return a matrix with seven columns, including miRNA, gene, correlation coefficients and Fold change, P-adjust value for miRNA and gene. Each row represents one potential miRNA-target gene interaction.

Usage

1
2
negative_cor(mrna_data, mirna_data, method = c("pearson", "kendall",
  "spearman"), cut.off = -0.5)

Arguments

mrna_data

differential expressed data in matrix format, with sample name in columns and gene symbol in rows, which is generated by differExp_discrete or differExp_continuous.

mirna_data

differential expressed data in matrix format, with sample name in columns and miRNA in rows, which is generated by differExp_discrete or differExp_continuous, miRNA should be miRBase 21 version now.

method

methods for calculating correlation coefficient, including "pearson", "spearman", "kendall". Default is "pearson". From function cor

cut.off

an numeric value indicating a threshold of correlation coefficient for every potential miRNA-genes interactions. Default is -0.5, however, if no interaction pass the threshold, this function would add 0.2 value in threshold until at least one interaction passed the threshold.

Value

matrix format with each row indicating one potential miRNA-target gene interaction and seven columns are miRNA, gene, correlation coefficient and Fold change, P-adjust value for miRNA and gene.

See Also

cor for calculation of correlation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Use the internal dataset
data("mirna", package = "anamiR", envir = environment())
data("pheno.mirna", package = "anamiR", envir = environment())
data("mrna", package = "anamiR", envir = environment())
data("pheno.mrna", package = "anamiR", envir = environment())

## SummarizedExperiment class
require(SummarizedExperiment)
mirna_se <- SummarizedExperiment(
 assays = SimpleList(counts=mirna),
 colData = pheno.mirna)

## SummarizedExperiment class
require(SummarizedExperiment)
mrna_se <- SummarizedExperiment(
 assays = SimpleList(counts=mrna),
 colData = pheno.mrna)

## Finding differential miRNA from miRNA expression data with t.test
mirna_d <- differExp_discrete(
   se = mirna_se,
   class = "ER",
   method = "t.test"
)

## Finding differential mRNA from mRNA expression data with t.test
mrna_d <- differExp_discrete(
   se = mrna_se,
   class = "ER",
   method = "t.test"
)

## Correlation
cor <- negative_cor(mrna_data = mrna_d, mirna_data = mirna_d,
     method = "pearson"
)

anamiR documentation built on Oct. 31, 2019, 8:55 a.m.