1 Introduction

microRNAs (miRNAs) regulate expression by promoting degradation or repressing translation of target transcripts. miRNA target sites have been cataloged in databases based on experimental validation and computational prediction using a variety of algorithms. Several online resources provide collections of multiple databases but need to be imported into other software, such as R, for processing, tabulation, graphing and computation. Currently available miRNA target site packages in R are limited in the number of databases, types of databases and flexibility.

The R package multiMiR, with web server at http://multimir.org, is a comprehensive collection of predicted and validated miRNA-target interactions and their associations with diseases and drugs. multiMiR includes several novel features not available in existing R packages:

  1. Compilation of 14 different databases, more than any other collection
  2. Expansion of databases to those based on disease annotation and drug response, in addition to many experimental and computational databases
  3. User-defined cutoffs for predicted binding strength to provide the most confident selection.

The multiMiR package enables retrieval of miRNA-target interactions from 14 external databases in R without the need to visit all these databases. Advanced users can also submit SQL queries to the web server to retrieve results. See the publication on PubMed for additional detail on the database and its creation. The database is now versioned so it is possible to use previous versions of databases from the current R package, however the package defaults to the most recent version.

Warning There are issues with merging target IDs from older unmaintained databases. Databases that have been updated more recently (1-2 years) use current versions of annotated IDs. In each update these old target IDs are carried over due to a lack of a reliable method to disambiguate the original ID with current IDs. Please keep this in mind with results from older databases that have not been updated. We continue to look at methods to resolve these ambiguities and improve target agreement between databases. You can use the unique() R function to identify and then remove multiple target genes if needed.

2 Getting to know the multiMiR database

The multiMiR web server http://multimir.org hosts a database containing miRNA-target interactions from external databases. The package multiMiR provides functions to communicate with the multiMiR web server and its database. The multiMiR database is now versioned. By default multiMiR will use the most recent version each time multiMiR is loaded. However it is now possible to switch between database versions and get information about the multiMiR database versions. multimir_dbInfoVersions() returns a dataframe with the available versions.

## Welcome to multiMiR.
## 
## multiMiR database URL has been set to the 
## default value: http://multimir.org/
## 
## Database Version: 2.3.0  Updated: 2020-04-15
##   VERSION    UPDATED                      RDA      DBNAME                 SCHEMA PUBLIC
## 1   2.3.0 2020-04-15 multimir_cutoffs_2.3.rda multimir2_3 multiMiR_DB_schema.sql      1
## 2   2.2.0 2017-08-08 multimir_cutoffs_2.2.rda multimir2_2 multiMiR_DB_schema.sql      1
## 3   2.1.0 2016-12-22 multimir_cutoffs_2.1.rda multimir2_1 multiMiR_DB_schema.sql      1
## 4   2.0.0 2015-05-01     multimir_cutoffs.rda    multimir multiMiR_DB_schema.sql      1
##                  TABLES
## 1 multiMiR_dbTables.txt
## 2 multiMiR_dbTables.txt
## 3 multiMiR_dbTables.txt
## 4 multiMiR_dbTables.txt

To switch between versions we can use multimir_switchDBVersion().

##   VERSION    UPDATED                      RDA      DBNAME                 SCHEMA PUBLIC
## 1   2.3.0 2020-04-15 multimir_cutoffs_2.3.rda multimir2_3 multiMiR_DB_schema.sql      1
## 2   2.2.0 2017-08-08 multimir_cutoffs_2.2.rda multimir2_2 multiMiR_DB_schema.sql      1
## 3   2.1.0 2016-12-22 multimir_cutoffs_2.1.rda multimir2_1 multiMiR_DB_schema.sql      1
## 4   2.0.0 2015-05-01     multimir_cutoffs.rda    multimir multiMiR_DB_schema.sql      1
##                  TABLES
## 1 multiMiR_dbTables.txt
## 2 multiMiR_dbTables.txt
## 3 multiMiR_dbTables.txt
## 4 multiMiR_dbTables.txt
## Now using database version: 2.0.0
## Now using database version: 2.3.0

The remaining functions will query the selected version until the package is reloaded or until we switch to another version.

Information from each external database is stored in a table in the multiMiR database. To see a list of the tables, we can use the multimir_dbTables() function.

##  [1] "diana_microt" "elmmo"        "map_counts"   "map_metadata" "microcosm"    "mir2disease" 
##  [7] "miranda"      "mirdb"        "mirecords"    "mirna"        "mirtarbase"   "pharmaco_mir"
## [13] "phenomir"     "pictar"       "pita"         "tarbase"      "target"       "targetscan"

To display the database schema, we can use the multimir_dbSchema() function. Following is only a portion of the full output.

## --
## -- Table structure for table `mirna`
## --
## 
## DROP TABLE IF EXISTS `mirna`;
## CREATE TABLE `mirna` (
##   mature_mirna_uid INTEGER UNSIGNED AUTO_INCREMENT,  -- mature miRNA unique ID
##   org VARCHAR(4) NOT NULL,                           -- organism abbreviation
##   mature_mirna_acc VARCHAR(20) default NULL,         -- mature miRNA accession
##   mature_mirna_id VARCHAR(20) default NULL,          -- mature miRNA ID/name
##   PRIMARY KEY (mature_mirna_uid),
##   KEY org (org),
##   KEY mature_mirna_acc (mature_mirna_acc),
##   KEY mature_mirna_id (mature_mirna_id)
## );
## 
## --
## -- Table structure for table `target`
## --
## 
## DROP TABLE IF EXISTS `target`;
## CREATE TABLE `target` (
##   target_uid INTEGER UNSIGNED AUTO_INCREMENT,   -- target gene unique ID
##   org VARCHAR(4) NOT NULL,                      -- organism abbreviation
##   target_symbol VARCHAR(80) default NULL,       -- target gene symbol
##   target_entrez VARCHAR(10) default NULL,       -- target gene Entrez gene ID
##   target_ensembl VARCHAR(20) default NULL,      -- target gene Ensembl gene ID
##   PRIMARY KEY (target_uid),
##   KEY org (org),
##   KEY target_symbol (target_symbol),
##   KEY target_entrez (target_entrez),
##   KEY target_ensembl (target_ensembl)
## );
## 
## --
## -- Table structure for table `mirecords`
## --
## 
## DROP TABLE IF EXISTS `mirecords`;
## CREATE TABLE `mirecords` (
##   mature_mirna_uid INTEGER UNSIGNED NOT NULL,   -- mature miRNA unique ID
##   target_uid INTEGER UNSIGNED NOT NULL,         -- target gene unique ID
##   target_site_number INT(10) default NULL,      -- target site number
##   target_site_position INT(10) default NULL,    -- target site position
##   experiment VARCHAR(160) default NULL,         -- supporting experiment
##   support_type VARCHAR(40) default NULL,        -- type of supporting experiment
##   pubmed_id VARCHAR(10) default NULL,           -- PubMed ID
##   FOREIGN KEY (mature_mirna_uid)
##     REFERENCES mirna(mature_mirna_uid)
##     ON UPDATE CASCADE ON DELETE RESTRICT,
##   FOREIGN KEY (target_uid)
##     REFERENCES target(target_uid)
##     ON UPDATE CASCADE ON DELETE RESTRICT
## );
## 
## ......
## 
## (Please note that only three of the 19 tables are shown here for demonstration
## purpose.)

The function multimir_dbInfo() will display information about the external miRNA and miRNA-target databases in multiMiR, including version, release date, link to download the data, and the corresponding table in multiMiR.

##        map_name                  source_name source_version  source_date
## 1  diana_microt                 DIANA-microT              5   Sept, 2013
## 2         elmmo                        EIMMo              5    Jan, 2011
## 3     microcosm                    MicroCosm              5   Sept, 2009
## 4   mir2disease                  miR2Disease                Mar 14, 2011
## 5       miranda                      miRanda                   Aug, 2010
## 6         mirdb                        miRDB              6   June, 2019
## 7     mirecords                    miRecords              4 Apr 27, 2013
## 8    mirtarbase                   miRTarBase            7.0   Sept, 2017
## 9  pharmaco_mir Pharmaco-miR (Verified Sets)                            
## 10     phenomir                     PhenomiR              2 Feb 15, 2011
## 11       pictar                       PicTar              2 Dec 21, 2012
## 12         pita                         PITA              6 Aug 31, 2008
## 13      tarbase                      TarBase              8         2018
## 14   targetscan                   TargetScan            7.2  March, 2018
##                                                                                 source_url
## 1           http://diana.imis.athena-innovation.gr/DianaTools/index.php?r=microT_CDS/index
## 2                                  http://www.mirz.unibas.ch/miRNAtargetPredictionBulk.php
## 3                http://www.ebi.ac.uk/enright-srv/microcosm/cgi-bin/targets/v5/download.pl
## 4                                                               http://www.mir2disease.org
## 5                                         http://www.microrna.org/microrna/getDownloads.do
## 6                                                                         http://mirdb.org
## 7                                                http://mirecords.biolead.org/download.php
## 8                                       http://mirtarbase.mbc.nctu.edu.tw/php/download.php
## 9                                       http://www.pharmaco-mir.org/home/download_VERSE_db
## 10                                             http://mips.helmholtz-muenchen.de/phenomir/
## 11                                                             http://dorina.mdc-berlin.de
## 12                                  http://genie.weizmann.ac.il/pubs/mir07/mir07_data.html
## 13 http://carolina.imis.athena-innovation.gr/diana_tools/web/index.php?r=tarbasev8%2Findex
## 14               http://www.targetscan.org/cgi-bin/targetscan/data_download.cgi?db=vert_61

Among the 14 external databases, eight contain predicted miRNA-target interactions (DIANA-microT-CDS, ElMMo, MicroCosm, miRanda, miRDB, PicTar, PITA, and TargetScan), three have experimentally validated miRNA-target interactions (miRecords, miRTarBase, and TarBase) and the remaining three contain miRNA-drug/disease associations (miR2Disease, Pharmaco-miR, and PhenomiR). To check these categories and databases from within R, we have a set of four helper functions:

## [1] "diana_microt" "elmmo"        "microcosm"    "miranda"      "mirdb"        "pictar"      
## [7] "pita"         "targetscan"
## [1] "mirecords"  "mirtarbase" "tarbase"
## [1] "mir2disease"  "pharmaco_mir" "phenomir"
## [1] "predicted"

To see how many records are in these 14 external databases we refer to the multimir_dbCount function.

##        map_name human_count mouse_count rat_count total_count
## 1  diana_microt     7664602     3747171         0    11411773
## 2         elmmo     3959112     1449133    547191     5955436
## 3     microcosm      762987      534735    353378     1651100
## 4   mir2disease        2875           0         0        2875
## 5       miranda     5429955     2379881    247368     8057204
## 6         mirdb     1990425     1091263    199250     3280938
## 7     mirecords        2425         449       171        3045
## 8    mirtarbase      544588       50673       652      595913
## 9  pharmaco_mir         308           5         0         313
## 10     phenomir       15138         491         0       15629
## 11       pictar      404066      302236         0      706302
## 12         pita     7710936     5163153         0    12874089
## 13      tarbase      433048      209831      1307      644186
## 14   targetscan    13906497    10442093         0    24348590
## human_count mouse_count   rat_count total_count 
##    42826962    25371114     1349317    69547393

The current version of multiMiR contains nearly 50 million records.

3 Changes to package:multiMiR - S3 and S4 classes

With the addition of multiMiR to Bioconductor, the return object has changed from an S3 (mmquery) to an S4 class (mmquery_bioc). The new S4 object has a similar structure to the prior version, except all returned datasets (validated, predicted, disease.drug) are now combined into a single dataset. To get only one type, filter on the type variable using the AnnotationDbi method discussed later or the base R approach subset(myqry@data, myqry@data$type == "validated")). For backwards compatibility, get_multimir() will return the old S3 object if the argument legacy.out = TRUE.

Features are now accessible using the S4 accessor operator @. Additionally, the AnnotationDbi accessor methods column, keys, keytypes, and select all work for mmquery_bioc objects. See Section 7.6.

4 List miRNAs, genes, drugs and diseases in the multiMiR database

In addition to functions displaying database and table information, the multiMiR package also provides the list_multimir() function to list all the unique miRNAs, target genes, drugs, and diseases in the multiMiR database. An option for limiting the number of returned records has been added to help with testing and exploration.

##   mature_mirna_uid org mature_mirna_acc mature_mirna_id
## 1             7829 ath     MIMAT0000184      ath-miR163
## 2             7833 ath     MIMAT0000201   ath-miR170-3p
## 3             7831 ath     MIMAT0000206   ath-miR173-5p
## 4             7828 ath     MIMAT0001001      ath-miR400
## 5             7837 ath     MIMAT0001004   ath-miR403-3p
## 6             7830 ath     MIMAT0001011   ath-miR408-3p
##   target_uid org target_symbol target_entrez target_ensembl
## 1     112854 ath     AT1G02860                             
## 2     112855 ath     AT1G06180                             
## 3     112856 ath     AT1G06580                             
## 4     112857 ath     AT1G15125                             
## 5     112868 ath     At1g31280                             
## 6     112869 ath     At1g50055
##                    drug
## 1 3,3'-diindolylmethane
## 2          5-fluoroucil
## 3               abt-737
## 4          alitretinoin
## 5       arabinocytosine
## 6      arsenic trioxide
##                                                    disease
## 1 ACTH-INDEPENDENT MACRONODULAR ADRENAL HYPERPLASIA; AIMAH
## 2                       ACUTE LYMPHOBLASTIC LEUKEMIA (ALL)
## 3                        ACUTE MYELOGENEOUS LEUKEMIA (AML)
## 4                             ACUTE MYELOID LEUKEMIA (AML)
## 5                       ACUTE PROMYELOCYTIC LEUKEMIA (APL)
## 6                                                  ADENOMA

The current version of multiMiR has 5830 miRNAs and 97186 target genes from human, mouse, and rat, as well as 64 drugs and 223 disease terms. Depending on the speed of your Internet connection, it may take a few minutes to retrieve the large number of target genes.

5 Use get_multimir() to query the multiMiR database

get_multimir() is the main function in the package to retrieve predicted and validated miRNA-target interactions and their disease and drug associations from the multiMiR database.

To get familiar with the parameters in get_multimir(), you can type ?get_multimir or help(get_multimir) in R. In the next section, many examples illustrate the use of the parameters.

6 Example of multiMiR in a Bioconductor workflow

This example shows the use of multiMiR alongside the edgeR Bioconductor package. Here we take microRNA data from ISS and ILS mouse strains and conduct a differential expression analysis. The top differentially expresssed microRNA’s are then used to search the multiMiR database for validated target genes.

## Loading required package: limma
## Searching mirecords ...
## Searching mirtarbase ...
## Searching tarbase ...
##    database mature_mirna_acc mature_mirna_id target_symbol target_entrez     target_ensembl
## 1 mirecords     MIMAT0000233 mmu-miR-200b-3p          Zeb2         24136 ENSMUSG00000026872
## 2 mirecords     MIMAT0000153  mmu-miR-141-3p          Dlx5         13395 ENSMUSG00000029755
## 3 mirecords     MIMAT0000519 mmu-miR-200a-3p          Dlx5         13395 ENSMUSG00000029755
## 4 mirecords     MIMAT0000541   mmu-miR-96-5p          Aqp5         11830 ENSMUSG00000044217
## 5 mirecords     MIMAT0000541   mmu-miR-96-5p        Celsr2         53883 ENSMUSG00000068740
## 6 mirecords     MIMAT0000541   mmu-miR-96-5p         Myrip        245049 ENSMUSG00000041794
##                                experiment support_type pubmed_id      type
## 1                            Western blot               17585049 validated
## 2 Western blot//Luciferase activity assay               19454767 validated
## 3 Western blot//Luciferase activity assay               19454767 validated
## 4                                                       19363478 validated
## 5                                                       19363478 validated
## 6                                                       19363478 validated

7 Examples of multiMiR queries

In this section a variety of examples are described on how to query the multiMiR database.

7.1 Example 1: Retrieve all validated target genes of a given miRNA

In the first example, we ask what genes are validated targets of hsa-miR-18a-3p.

## Searching mirecords ...
## Searching mirtarbase ...
## Searching tarbase ...
## NULL
## 
## validated 
##       803
##     database mature_mirna_acc mature_mirna_id target_symbol target_entrez  target_ensembl
## 1  mirecords     MIMAT0002891  hsa-miR-18a-3p          KRAS          3845 ENSG00000133703
## 2 mirtarbase     MIMAT0002891  hsa-miR-18a-3p          ACLY            47 ENSG00000131473
## 3 mirtarbase     MIMAT0002891  hsa-miR-18a-3p         AP1B1           162 ENSG00000100280
## 4 mirtarbase     MIMAT0002891  hsa-miR-18a-3p         ALDOA           226 ENSG00000149925
## 5 mirtarbase     MIMAT0002891  hsa-miR-18a-3p          ARF5           381 ENSG00000004059
## 6 mirtarbase     MIMAT0002891  hsa-miR-18a-3p           ATM           472 ENSG00000149311
##                                                             experiment          support_type
## 1                              Western blot//Luciferase activity assay                      
## 2                                                                CLASH Functional MTI (Weak)
## 3                                                                CLASH Functional MTI (Weak)
## 4                                                             PAR-CLIP Functional MTI (Weak)
## 5                                                                CLASH Functional MTI (Weak)
## 6 Immunofluorescence//Luciferase reporter assay//qRT-PCR//Western blot        Functional MTI
##   pubmed_id      type
## 1  19372139 validated
## 2  23622248 validated
## 3  23622248 validated
## 4  27292025 validated
## 5  23622248 validated
## 6  25963391 validated
##       database mature_mirna_acc mature_mirna_id target_symbol target_entrez  target_ensembl
## 1    mirecords     MIMAT0002891  hsa-miR-18a-3p          KRAS          3845 ENSG00000133703
## 6   mirtarbase     MIMAT0002891  hsa-miR-18a-3p           ATM           472 ENSG00000149311
## 58  mirtarbase     MIMAT0002891  hsa-miR-18a-3p          KRAS          3845 ENSG00000133703
## 254 mirtarbase     MIMAT0002891  hsa-miR-18a-3p          CBX7         23492 ENSG00000100307
##                                                               experiment   support_type pubmed_id
## 1                                Western blot//Luciferase activity assay                 19372139
## 6   Immunofluorescence//Luciferase reporter assay//qRT-PCR//Western blot Functional MTI  25963391
## 58                      Luciferase reporter assay//qRT-PCR//Western blot Functional MTI  19372139
## 254                              Luciferase reporter assay//Western blot Functional MTI  28123848
##          type
## 1   validated
## 6   validated
## 58  validated
## 254 validated
##    mature_mirna_acc mature_mirna_id target_symbol target_entrez  target_ensembl mirecords
## 17     MIMAT0002891  hsa-miR-18a-3p          KRAS          3845 ENSG00000133703         1
##    mirtarbase tarbase validated.sum all.sum
## 17          1       0             2       2

It turns out that KRAS is the only target validated by Luciferase assay. The interaction was recorded in miRecords and miRTarBase and supported by the same literature, whose PubMed ID is in column pubmed_id. The summary (by setting summary = TRUE when calling get_multimir()) shows the number of records in each of the external databases and the total number of databases supporting the interaction.

7.2 Example 2: Retrieve miRNA-target interactions associated with a given drug or disease

In this example we would like to know which miRNAs and their target genes are associated with Cisplatin, a chemotherapy drug used in several cancers.

## Searching mir2disease ...
## Searching pharmaco_mir ...
## Searching phenomir ...
## NULL
## [1] 45
## 
## disease.drug 
##           45
##       database mature_mirna_acc mature_mirna_id target_symbol target_entrez  target_ensembl
## 1 pharmaco_mir     MIMAT0000772  hsa-miR-345-5p         ABCC1          4363 ENSG00000103222
## 2 pharmaco_mir     MIMAT0000720 hsa-miR-376c-3p          ALK7                              
## 3 pharmaco_mir     MIMAT0000423 hsa-miR-125b-5p          BAK1           578 ENSG00000030110
## 4 pharmaco_mir                       hsa-miR-34          BCL2           596 ENSG00000171791
## 5 pharmaco_mir     MIMAT0000318 hsa-miR-200b-3p          BCL2           596 ENSG00000171791
## 6 pharmaco_mir     MIMAT0000617 hsa-miR-200c-3p          BCL2           596 ENSG00000171791
##   disease_drug paper_pubmedID         type
## 1    cisplatin       20099276 disease.drug
## 2    cisplatin       21224400 disease.drug
## 3    cisplatin       21823019 disease.drug
## 4    cisplatin       18803879 disease.drug
## 5    cisplatin       21993663 disease.drug
## 6    cisplatin       21993663 disease.drug

get_multimir() returns 53 miRNA-target pairs. For more information, we can always refer to the published papers with PubMed IDs in column paper_pubmedID.

7.3 Example 3: Select miRNAs predicted to target a gene

get_multimir() also takes target gene(s) as input. In this example we retrieve miRNAs predicted to target Gnb1 in mouse. For predicted interactions, the default is to query the top 20% predictions within each external database, which is equivalent to setting parameters predicted.cutoff = 20 and predicted.cutoff.type = 'p' (for percentage cutoff). Here we search the top 35% among all conserved and nonconserved target sites.

## Searching diana_microt ...
## Searching elmmo ...
## Searching microcosm ...
## Searching miranda ...
## Searching mirdb ...
## Searching pictar ...
## Searching pita ...
## Searching targetscan ...
## NULL
## 
## predicted 
##       716
##       database mature_mirna_acc   mature_mirna_id target_symbol target_entrez     target_ensembl
## 1 diana_microt     MIMAT0000663    mmu-miR-218-5p          Gnb1         14688 ENSMUSG00000029064
## 2 diana_microt     MIMAT0017276    mmu-miR-493-5p          Gnb1         14688 ENSMUSG00000029064
## 3 diana_microt     MIMAT0000656    mmu-miR-139-5p          Gnb1         14688 ENSMUSG00000029064
## 4 diana_microt     MIMAT0014946 mmu-miR-3074-2-3p          Gnb1         14688 ENSMUSG00000029064
## 5 diana_microt     MIMAT0000144    mmu-miR-132-3p          Gnb1         14688 ENSMUSG00000029064
## 6 diana_microt     MIMAT0020608      mmu-miR-5101          Gnb1         14688 ENSMUSG00000029064
##   score      type
## 1 0.975 predicted
## 2 0.964 predicted
## 3  0.96 predicted
## 4 0.921 predicted
## 5  0.92 predicted
## 6 0.918 predicted
##   mature_mirna_acc mature_mirna_id target_symbol target_entrez     target_ensembl diana_microt
## 1     MIMAT0000133 mmu-miR-101a-3p          Gnb1         14688 ENSMUSG00000029064            1
## 2     MIMAT0000616 mmu-miR-101b-3p          Gnb1         14688 ENSMUSG00000029064            1
## 3     MIMAT0000663  mmu-miR-218-5p          Gnb1         14688 ENSMUSG00000029064            1
## 4     MIMAT0003476 mmu-miR-669b-5p          Gnb1         14688 ENSMUSG00000029064            1
## 5     MIMAT0017276  mmu-miR-493-5p          Gnb1         14688 ENSMUSG00000029064            1
## 6     MIMAT0000144  mmu-miR-132-3p          Gnb1         14688 ENSMUSG00000029064            1
##   elmmo microcosm miranda mirdb pictar pita targetscan predicted.sum all.sum
## 1     2         1       1     0      2    0          0             5       5
## 2     2         1       1     0      2    0          0             5       5
## 3     4         0       0     1      0    2          1             5       5
## 4     0         0       1     2      0    1          2             5       5
## 5     4         0       0     2      2    0          1             5       5
## 6     2         0       0     2      0    0          2             4       4

The records in example3@predicted are ordered by scores from best to worst within each external database. Once again, the summary option allows us to examine the number of target sites predicted by each external database and the total number of databases predicting the interaction.

Finally we examine how many predictions each of the databases has.

## diana_microt        elmmo    microcosm      miranda        mirdb       pictar         pita 
##          105           51            5           43           37            9          132 
##   targetscan 
##          177

7.4 Example 4: Select miRNA(s) predicted to target most, if not all, of the genes of interest

You may have a list of genes involved in a common biological process. It is interesting to check whether some, or all, of these genes are targeted by the same miRNA(s). Here we have four genes involved in chronic obstructive pulmonary disease (COPD) in human and want to know what miRNAs target these genes by searching the top 500,000 predictions in each external database.

## Number predicted cutoff (predicted.cutoff) 500000 is larger than the total number of records in table pictar. All records will be queried.
## Number predicted cutoff (predicted.cutoff) 500000 is larger than the total number of records in table targetscan. All records will be queried.
## Searching diana_microt ...
## Searching elmmo ...
## Searching microcosm ...
## Searching miranda ...
## Searching mirdb ...
## Searching pictar ...
## Searching pita ...
## Searching targetscan ...

Then we count the number of target genes for each miRNA.

##                  target_symbol
## mature_mirna_id   AKT2 CERS6 S1PR3 SULF2 Sum
##   hsa-miR-129-5p     0     1     2     1   4
##   hsa-miR-330-3p     0     1     2     1   4
##   hsa-miR-144-3p     0     1     2     0   3
##   hsa-miR-3180-5p    0     1     2     0   3
##   hsa-miR-325-3p     1     1     0     1   3
##   hsa-miR-34a-5p     0     1     2     0   3

7.5 Example 5: Retrieve interactions between a set of miRNAs and a set of genes

In this example, we profiled miRNA and mRNA expression in poorly metastatic bladder cancer cell lines T24 and Luc, and their metastatic derivatives FL4 and Lul2, respectively. We identified differentially expressed miRNAs and genes between the metastatic and poorly metastatic cells. Let’s load the data.

Variable DE.miRNA.up contains 9 up-regulated miRNAs and variable DE.entrez.dn has 47 down-regulated genes in the two metastatic cell lines. The hypothesis is that interactions between these miRNAs and genes whose expression changed at opposite directions may play a role in cancer metastasis. So we use multiMiR to check whether any of the nine miRNAs could target any of the 47 genes.

## Searching mirecords ...
## Warning: `as_data_frame()` was deprecated in tibble 2.0.0.
## Please use `as_tibble()` instead.
## The signature and semantics have changed, see `?as_tibble`.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## Searching mirtarbase ...
## Searching tarbase ...
## Searching diana_microt ...
## Searching elmmo ...
## Searching microcosm ...
## Searching miranda ...
## Searching mirdb ...
## Searching pictar ...
## Searching pita ...
## Searching targetscan ...
## Searching mir2disease ...
## Searching pharmaco_mir ...
## Searching phenomir ...
## Warning in matrix(info[, !is.na(p.m)], ncol = sum(!is.na(p.m))): data length [917] is not a sub-
## multiple or multiple of the number of rows [153]
## Warning in cbind(info, predicted.sum = p.sum): number of rows of result is not a multiple of vector
## length (arg 2)
## Joining, by = c("database", "mature_mirna_acc", "mature_mirna_id", "target_symbol",
## "target_entrez", "target_ensembl", "type")
## Joining, by = c("database", "mature_mirna_acc", "mature_mirna_id", "target_symbol",
## "target_entrez", "target_ensembl", "type")
## 
## disease.drug    predicted    validated 
##          442          160           98
## # A tibble: 98 × 13
##    database   mature_mirna_acc mature_mirna_id target_symbol target_entrez target_ensembl experiment
##    <chr>      <chr>            <chr>           <chr>         <chr>         <chr>          <chr>     
##  1 mirtarbase MIMAT0000087     hsa-miR-30a-5p  FDX1          2230          ENSG000001377… Proteomics
##  2 mirtarbase MIMAT0000259     hsa-miR-182-5p  CUL5          8065          ENSG000001662… qRT-PCR   
##  3 mirtarbase MIMAT0000418     hsa-miR-23b-3p  RRAS2         22800         ENSG000001338… Luciferas…
##  4 mirtarbase MIMAT0000087     hsa-miR-30a-5p  LIMCH1        22998         ENSG000000640… pSILAC//P…
##  5 mirtarbase MIMAT0000418     hsa-miR-23b-3p  SWAP70        23075         ENSG000001337… PAR-CLIP  
##  6 mirtarbase MIMAT0000087     hsa-miR-30a-5p  PEG10         23089         ENSG000002422… PAR-CLIP  
##  7 mirtarbase MIMAT0000245     hsa-miR-30d-5p  PEG10         23089         ENSG000002422… PAR-CLIP  
##  8 mirtarbase MIMAT0000420     hsa-miR-30b-5p  PEG10         23089         ENSG000002422… PAR-CLIP  
##  9 tarbase    MIMAT0000418     hsa-miR-23b-3p  LIMA1         51474         ENSG000000504… Degradome…
## 10 tarbase    MIMAT0000449     hsa-miR-146a-5p LIMA1         51474         ENSG000000504… Degradome…
## # … with 88 more rows, and 6 more variables: support_type <chr>, pubmed_id <chr>, type <chr>,
## #   score <chr>, disease_drug <chr>, paper_pubmedID <chr>

In the result, there are 85 unique miRNA-gene pairs that have been validated.

## # A tibble: 3 × 13
##   database    mature_mirna_acc mature_mirna_id target_symbol target_entrez target_ensembl experiment
##   <chr>       <chr>            <chr>           <chr>         <chr>         <chr>          <chr>     
## 1 mir2disease MIMAT0000418     hsa-miR-23b-3p  NA            NA            NA             <NA>      
## 2 phenomir    MIMAT0000418     hsa-miR-23b-3p  NA            NA            NA             <NA>      
## 3 phenomir    MIMAT0000449     hsa-miR-146a-5p NA            NA            NA             <NA>      
## # … with 6 more variables: support_type <chr>, pubmed_id <chr>, type <chr>, score <chr>,
## #   disease_drug <chr>, paper_pubmedID <chr>

2 miRNAs are associated with bladder cancer in miR2Disease and PhenomiR.

The predicted databases predict 65 miRNA-gene pairs between the 9 miRNAs and 28 of the 47 genes.

## [1] 8
## [1] 26
## [1] 58
##          miRNA.ID target.Entrez
## 1  hsa-miR-182-5p          1112
## 3  hsa-miR-182-5p          2017
## 5  hsa-miR-30a-5p         22998
## 7  hsa-miR-30b-5p         22998
## 9  hsa-miR-30d-5p         22998
## 11 hsa-miR-182-5p          5962

Results from each of the predicted databases are already ordered by their scores from best to worst.

7.6 Use of AnnotationDbi accessor methods

AnnotationDbi accessor methods can be used to select and filter the data returned by get_multimir().

## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
## [1] "hsa-miR-4795-3p" "hsa-miR-126-5p"  "hsa-miR-545-3p"  "hsa-miR-3944-5p" "hsa-miR-5688"   
## [6] "hsa-miR-137-3p"
## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
##         database mature_mirna_id target_entrez
## 1   diana_microt hsa-miR-4795-3p          1903
## 2   diana_microt  hsa-miR-126-5p          1903
## 3   diana_microt  hsa-miR-545-3p        253782
## 4   diana_microt hsa-miR-3944-5p         55959
## 63  diana_microt hsa-miR-4795-3p        253782
## 423        elmmo  hsa-miR-545-3p        253782
## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
## [1] "mmu-miR-218-5p"    "mmu-miR-493-5p"    "mmu-miR-139-5p"    "mmu-miR-3074-2-3p"
## [5] "mmu-miR-132-3p"    "mmu-miR-5101"
## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
##         database   mature_mirna_id target_entrez score
## 1   diana_microt    mmu-miR-218-5p         14688 0.975
## 2   diana_microt    mmu-miR-493-5p         14688 0.964
## 3   diana_microt    mmu-miR-139-5p         14688  0.96
## 4   diana_microt mmu-miR-3074-2-3p         14688 0.921
## 106        elmmo    mmu-miR-218-5p         14688 0.849
## 107        elmmo    mmu-miR-218-5p         14688 0.849
## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
## [1] "database"         "mature_mirna_acc" "mature_mirna_id"  "score"            "target_ensembl"  
## [6] "target_entrez"    "target_symbol"    "type"
## [1] "1903"   "253782" "55959"  "208"    "286223"
##        database target_entrez score
## 1  diana_microt          1903     1
## 2  diana_microt          1903 0.998
## 5  diana_microt          1903 0.994
## 19 diana_microt          1903  0.98
## 32 diana_microt          1903 0.964
## 56 diana_microt          1903 0.934

8 Direct query to the database on the multiMiR web server

As shown previously, get_multimir is the main function to retrieve information from the multiMiR database, which is hosted at http://multimir.org. The function builds one SQL query for every external database that the user is going to search, submits the query to the web server, and parses, combines, and summarizes results from the web server. For advanced users, there are a couple ways to query the multiMiR database without using the multiMiR package; but they have to be familiar with SQL queries. In general, users are still advised to use the get_multimir() function when querying multiple external databases in multiMiR.

8.1 Direct query on the web server

The multiMiR package communicates with the multiMiR database via the script http://multimir.org/cgi-bin/multimir_univ.pl on the web server. Once again, data from each of the external databases is stored in a table in multiMiR. There are also tables for miRNAs (table mirna) and target genes (table target).

NOTE: While it is possible to complete short queries from a browser, the limits of submitting a query through typing in the address bar of a browser are quickly reached (8192 characters total). If you are a developer you should use your preferred method to submit a HTTP POST which will allow for longer queries. The fields to include are query and dbName. query is the SQL query to submit. dbName is the DBNAME column from a call to multimir_dbInfoVersions(), however if this is excluded the current version is the default.

To learn about the structure of a table (e.g. DIANA-microT data in table diana_microt), users can use URL

http://multimir.org/cgi-bin/multimir_univ.pl?query=describe diana_microt

Similar with Example 1, the following URL searches for validated target genes of hsa-miR-18a-3p in miRecords.

http://multimir.org/cgi-bin/multimir.pl?query=SELECT m.mature_mirna_acc, m.mature_mirna_id, t.target_symbol, t.target_entrez, t.target_ensembl, i.experiment, i.support_type, i.pubmed_id FROM mirna AS m INNER JOIN mirecords AS i INNER JOIN target AS t ON (m.mature_mirna_uid=i.mature_mirna_uid and i.target_uid=t.target_uid) WHERE m.mature_mirna_id=‘hsa-miR-18a-3p’

As you can see, the query is long and searches just one of the three validated tables in multiMiR. While in Example 1, one line of R command using the get_multimir() function searches, combines and summarizes results from all three validated external databases (miRecords, miRTarBase and TarBase).

8.2 Direct query in R

The same direct queries we did above on the web server can be done in R as well. This is the preferred method if you are unfamiliar with HTTP POST. Be sure to set the correct database version, if you wish to change versions, before calling search_multimir() it uses the currently set version.

To show the structure of table diana_microt:

##              Field             Type Null Key Default Extra
## 1 mature_mirna_uid int(10) unsigned   NO MUL              
## 2       target_uid int(10) unsigned   NO MUL              
## 3       miTG_score           double   NO MUL              
## 4         UTR3_hit int(10) unsigned   NO                  
## 5          CDS_hit int(10) unsigned   NO

To search for validated target genes of hsa-miR-18a-3p in miRecords:

##   mature_mirna_acc mature_mirna_id target_symbol target_entrez  target_ensembl
## 1     MIMAT0002891  hsa-miR-18a-3p          KRAS          3845 ENSG00000133703
##                                experiment support_type pubmed_id
## 1 Western blot//Luciferase activity assay               19372139

9 Session Info

## R version 4.2.0 RC (2022-04-21 r82226)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.16-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.16-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB             
##  [4] LC_COLLATE=C               LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
## [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] edgeR_3.39.0     limma_3.53.0     multiMiR_1.19.0  knitr_1.38       BiocStyle_2.25.0
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.8.3           locfit_1.5-9.5         lattice_0.20-45        png_0.1-7             
##  [5] Biostrings_2.65.0      assertthat_0.2.1       digest_0.6.29          utf8_1.2.2            
##  [9] R6_2.5.1               GenomeInfoDb_1.33.0    stats4_4.2.0           RSQLite_2.2.12        
## [13] evaluate_0.15          httr_1.4.2             pillar_1.7.0           zlibbioc_1.43.0       
## [17] rlang_1.0.2            jquerylib_0.1.4        blob_1.2.3             S4Vectors_0.35.0      
## [21] rmarkdown_2.14         splines_4.2.0          stringr_1.4.0          RCurl_1.98-1.6        
## [25] bit_4.0.4              compiler_4.2.0         xfun_0.30              pkgconfig_2.0.3       
## [29] BiocGenerics_0.43.0    htmltools_0.5.2        tidyselect_1.1.2       KEGGREST_1.37.0       
## [33] tibble_3.1.6           GenomeInfoDbData_1.2.8 bookdown_0.26          IRanges_2.31.0        
## [37] XML_3.99-0.9           fansi_1.0.3            crayon_1.5.1           dplyr_1.0.8           
## [41] bitops_1.0-7           grid_4.2.0             jsonlite_1.8.0         lifecycle_1.0.1       
## [45] DBI_1.1.2              magrittr_2.0.3         cli_3.3.0              stringi_1.7.6         
## [49] cachem_1.0.6           XVector_0.37.0         bslib_0.3.1            ellipsis_0.3.2        
## [53] generics_0.1.2         vctrs_0.4.1            tools_4.2.0            bit64_4.0.5           
## [57] Biobase_2.57.0         glue_1.6.2             purrr_0.3.4            fastmap_1.1.0         
## [61] yaml_2.3.5             AnnotationDbi_1.59.0   BiocManager_1.30.17    memoise_2.0.1         
## [65] sass_0.4.1