# calculate statistically significant miRNA and mRNA target pairs using pearsons correlation

1 hour ago by

Sheffield, UK

Code-wise, this is fairly easy, I'm sure their are more elegant ways, but:

``````get_cor <- function(mRNA, miRNA) {
target_corr <- cor.test(miRNA_mat[miRNA,], mRNA_mat[mRNA,], method="pearson")
return(data.frame(gene = mRNA,
mirRNA = miRNA,
p.value=target_corr\$p.value,
correlation=target_corr\$estimate))
}

per_miRNA <- function(miRNA){
this_miRNA_corrs <- sapply(rownames(mRNA_mat), get_cor, miRNA=miRNA, simplify=FALSE)
this_miRNA_corrs <- do.call(rbind, this_miRNA_corrs)
return(this_miRNA_coors)
}

all_corrs <- sapply(rownanes(miRNA_mat), per_miRNA, simplify=FALSE)
all_corrs <- do.call(rbind, all_corrs)
You'll need your data in two matricies `miRNA_mat` and `mRNA_mat`. You probably want to ask yourself if this is the analysis you want to do. Firstly this analysis assumes that that both miRNA and mRNA counts are normally distributed, which they are not. It also assumes that there is a linear relationship between the amount of miRNA the effect on the mRNA (e.g. that if you double the amount of miRNA, you'll have twice the effect on mRNA), but this is not a known fact. Indeed, modeling efforts thus far suggest that miRNA acts more like a linear rectifier - that when target expression level is below a certain theshold they completely inhibit expression, and above this threshold, they have very little effect on target expression. See: www.ncbi.nlm.nih.gov/pmc/articles/PMC3163764/