library(multiMiR) # # 1. Example 1. miRNA as input, default parameters # # the default is to search validated interactions (i.e. table="validated") example1 = get.multimir(mirna="hsa-miR-18a-3p", summary=TRUE) names(example1) # interactions supported by luciferase assay example1$validated[grep("Luciferase", example1$validated[,"experiment"]),] example1$summary[example1$summary[,"target_symbol"] == "KRAS",] # # 2. Example 2. disease/drug as input # # search the disease/drug association example2 = get.multimir(disease.drug="cisplatin", table="disease.drug") names(example2) nrow(example2$disease.drug) head(example2$disease.drug) # # 3. Case study 1: alcohol drinking in mice # # query the top 35% predictions, all tables, all conserved and nonconserved target sites case1 = get.multimir(org = "mmu", target = "Gnb1", table = "all", predicted.cutoff = 35, predicted.cutoff.type = "p", predicted.site = "all", summary = TRUE) names(case1) # count the number of records by each table (or external database) apply(case1$summary[,6:15], 2, function(x) sum(x>0)) # 2 validated miRNAs (mmu-miR-7b-5p & mmu-miR-324-3p) case1$validated case1.val.mir = as.character(unique(case1$validated$mature_mirna_id)) # which software also predicted these 2 validated miRNAs - PITA is the only one m = match(case1.val.mir, case1$summary$mature_mirna_id) case1$summary[m,] # individual program - already ordered by scores in each program case1.split = split(case1$predicted, case1$predicted$database) nrow(case1.split$pita) match(case1.val.mir, case1.split$pita$mature_mirna_id) # case1$summary is ranked by the number supporting software. # Add the number of hits (target sites) to case1$summary allhits = apply(case1$summary[,6:15], 1, sum) case1.allhits = cbind(case1$summary, allhits) head(case1.allhits,10) # # 4. Case study 2: COPD in human # # query top 500,000 predictions in each table case2 = get.multimir(org="hsa", target=c("AKT2","CERS6","S1PR3","SULF2"), table="predicted", summary=TRUE, predicted.cutoff.type="n", predicted.cutoff=500000) # count the number of records by each table (or external database) apply(case2$summary[,6:13], 2, function(x) sum(x>0)) # count the number of target genes for each miRNA case2.counts = addmargins(table(case2$summary[,2:3])) case2.counts = case2.counts[-nrow(case2.counts),] case2.counts = case2.counts[order(case2.counts[,5], decreasing=TRUE),] # 465 miRNAs have at least one predicted site to one of the four genes nrow(case2.counts) head(case2.counts) # summary of hsa-miR-429 predictions case2$summary[grep("^hsa-miR-429$", case2$summary$mature_mirna_id),] # individual program - already ordered by scores in each program case2.split = split(case2$predicted, case2$predicted$database) # # 5. Case study 3: bladder cancer tumorigenesis # load(url("http://multimir.ucdenver.edu/bladder.rda")) # NOTE: # DE.miRNA.info contains information of differentially expressed (DE) miRNAs # that are common in the 2 cell line pairs (T24 vs. FL4; Luc vs. Lul2) and # whose expression changes are going at the same direction in the 2 pairs. # DE.gene.info contains information of DE mRNA genes that are common in the # 2 cell line pairs and whose expression changes are going at the same # direction in the 2 pairs. # the 9 DE miRNAs - all are up-regulated (in FL4 & Lul2) DE.miRNA = DE.miRNA.info$miRNA # the 83 DE Entrez gene IDs DE.entrez = unlist(lapply(as.character(DE.gene.info$ENTREZ_GENE_ID), function (x) {strsplit(x, " /// ")[[1]]})) DE.entrez = unique(DE.entrez) # 36 up-regulated genes (in FL4 & Lul2) DE.entrez.up = unlist(lapply(as.character(DE.gene.info$ENTREZ_GENE_ID[DE.gene.info$T24_FL4.logFC > 0]), function (x) {strsplit(x, " /// ")[[1]]})) DE.entrez.up = unique(DE.entrez.up) # 47 down-regulated genes (in FL4 & Lul2) DE.entrez.dn = unlist(lapply(as.character(DE.gene.info$ENTREZ_GENE_ID[DE.gene.info$T24_FL4.logFC < 0]), function (x) {strsplit(x, " /// ")[[1]]})) DE.entrez.dn = unique(DE.entrez.dn) # interaction between 9 up-regulated miRNAs and 47 down-regulated genes - # search all tables & top 10% predictions case3 = get.multimir(org="hsa", mirna=DE.miRNA, target=DE.entrez.dn, table="all", summary=TRUE, predicted.cutoff.type="p", predicted.cutoff=10) # 3 unique miRNA-gene pairs are validated case3$validated # all 9 miRNAs are related to disease # they are associated with 100 disease terms case3$disease.drug = unique(case3$disease.drug) case3.disease = tolower(case3$disease.drug$disease_drug) case3.disease = gsub(" \\(\\w*\\)", "", case3.disease) case3$disease.drug$disease_drug = case3.disease length(unique(case3$disease.drug$mature_mirna_id)) length(unique(case3$disease.drug$disease_drug)) # detailed miRNA-disease association case3.mir_disease = table(case3$disease.drug$disease_drug, case3$disease.drug$mature_mirna_id) case3.sum = apply(case3.mir_disease[,1:ncol(case3.mir_disease)], 1, sum) case3.mir_sum = apply(case3.mir_disease[,1:ncol(case3.mir_disease)], 1, function(x) {sum(x>0)}) case3.mir_disease = cbind(case3.mir_disease, Sum=case3.sum, miR.Sum=case3.mir_sum) case3.mir_disease = case3.mir_disease[order(case3.mir_disease[,ncol(case3.mir_disease)], decreasing=TRUE),] head(case3.mir_disease) # 2 of the miRNAs are associated with bladder cancer in miR2Disease & PhenomiR case3$disease.drug[grep("bladder", case3$disease.drug$disease_drug, ignore.case=TRUE),] # predictions: 65 pairs between 9 miRNAs and 28 of the 47 genes length(unique(case3$predicted$mature_mirna_id)) length(unique(case3$predicted$target_entrez)) unique.pairs = unique(data.frame(miRNA.ID=as.character(case3$predicted$mature_mirna_id), target.Entrez=as.character(case3$predicted$target_entrez))) nrow(unique.pairs) # individual program - already ordered by scores in each program case3.split = split(case3$predicted, case3$predicted$database) # NOTE: # DE.miRNA.info is Supplementary Table 3; # DE.gene.info is Supplementary Table 4; # case3$summary is Supplementary Table 5.