mirDIP : microRNA Data Integration Portal



You can use this API for calling mirDIP from your R code.

      Windows   Linux   Mac






# please install package httr
library(httr)

# const values
url <- "http://ophid.utoronto.ca/mirDIP"

mapScore <- list("0", "1", "2", "3");
names(mapScore) <- c("Very High", "High", "Medium", "Low")


unidirectionalSearchOnGenes <- function(geneSymbols, minimumScore) {

    parameters <- list(
        genesymbol = geneSymbols,
        microrna = "",
        scoreClass = mapScore[minimumScore]
    )

    # ... send http POST
    res <- POST(paste(url, "/Http_U", sep = ""), body = parameters, encode = "form", verbose())
}


unidirectionalSearchOnMicroRNAs <- function(microRNAs, minimumScore) {

    parameters <- list(
        genesymbol = "",
        microrna = microRNAs,
        scoreClass = mapScore[minimumScore]
    )

    # ... send http POST
    res <- POST(paste(url, "/Http_U", sep = ""), body = parameters, encode = "form", verbose())
}


bidirectionalSearch <- function(geneSymbols, microRNAs, minimumScore, sources, occurrances) {

    parameters <- list(
        genesymbol = geneSymbols,
        microrna = microRNAs,
        scoreClass = mapScore[minimumScore],
        dbOccurrences = occurrances,
        sources = sources
    )

    # ... send http POST
    res <- POST(paste(url, "/Http_B", sep = ""), body = parameters, encode = "form", verbose())
}

# make results-map as keyword - value
makeMap <- function(res) {

    ENTRY_DEL = "\001"
    KEY_DEL = "\002"

    response = content(res, "text")

    arr = unlist(strsplit(response, ENTRY_DEL, fixed = TRUE))

    list_map <- list("")
    vec_map_names <- c("");

    for (str in arr) {
        arrKeyValue = unlist(strsplit(str, KEY_DEL, fixed = TRUE));

        if (length(arrKeyValue) > 1) {
            list_map[length(list_map) + 1] <- arrKeyValue[2]
            vec_map_names[length(vec_map_names) + 1] <- arrKeyValue[1]
        }
    }

    names(list_map) <- vec_map_names

    list_map
}










# ... Pick - up right sample for your search
# Note: Adjust 'ophid.utoronto.ca' if you are using our development server.


if (TRUE) { # change to FALSE to comment this sample

    ####################################################
    # Example of Unidirectional search on Gene Symbols #
    ####################################################

    # GeneSymbols
    # - Comma delimited.
    # - Follow to HUGO approved spelling.
    geneSymbols = "AKAP17A,AKR1C2,APP,ZZZ3,MARK4,C17orf51"

    # Minimum Score
    # - Use one of those:'Very High', 'High', 'Medium', 'Low'.
    # - Mind exact spelling.
    minimumScore = "Very High";

    res <- unidirectionalSearchOnGenes(geneSymbols, minimumScore)

    responseCode = status_code(res)
    if (responseCode != 200) {

        cat("Error: Response Code : ", responseCode, "\r\n")
    } else {

        list_map <- makeMap(res)

        # print results
        cat("\r\n", "Unidirectional Search on Gene(s):", "\r\n")

        cat("Generated at: ", unlist(list_map["generated_at"]), "\r\n")
        cat("Gene Symbols: ", unlist(list_map["gene_symbols"]), "\r\n")
        cat("Minimum Score: ", unlist(list_map["minimum_score"]), "\r\n")

        cat("\r\n", "Results Size: ", unlist(list_map["results_size"]), "\r\n")
        cat("Results: \r\n", unlist(list_map["results"]), "\r\n") # formatted as tab - delimited spreadsheet
    }
}


if (TRUE) { # change to FALSE to comment this sample

    #################################################
    # Example of Unidirectional search on MicroRNAs #
    #################################################

    # MicroRMAs
    # - Comma delimited.
    # - Follow the notation as shown.
    microRNAs = "hsa-miR-603, hsa-let-7a-3p, hsa-miR-625-5p, hsa-miR-7852-3p, hsa-miR-17-5p"

    # Minimum Score
    # - Use one of those:'Very High', 'High', 'Medium', 'Low' .
    # - Mind exact spelling.
    minimumScore = "Very High"

    res <- unidirectionalSearchOnMicroRNAs(microRNAs, minimumScore)

    responseCode = status_code(res)
    if (responseCode != 200) {

        cat("Error: Response Code : ", responseCode, "\r\n")
    } else {

        list_map <- makeMap(res)

        # print results
        cat("\r\n", "Unidirectional Search on MicroRNA(s):", "\r\n")

        cat("Generated at: ", unlist(list_map["generated_at"]), "\r\n")
        cat("Micro RNAs: ", unlist(list_map["micro_rnas"]), "\r\n")
        cat("Minimum Score: ", unlist(list_map["minimum_score"]), "\r\n")

        cat("\r\n", "Results Size: ", unlist(list_map["results_size"]), "\r\n")
        cat("Results: \r\n", unlist(list_map["results"]), "\r\n") # formatted as tab - delimited spreadsheet
    }
}




if (TRUE) { # change to FALSE to comment this sample

    ###################################
    # Example of Bidirectional search #
    ###################################

    # GeneSymbols
    # - Comma delimited.
    # - Follow to HUGO approved spelling.
    geneSymbols = "AKAP17A,AKR1C2,APP,ZZZ3,MARK4, C17orf51"

    # MicroRMAs
    # - Comma delimited;
    # - Follow the notation as shown.
    microRNAs = "hsa-miR-603,hsa-let-7a-3p,hsa-miR-625-5p,hsa-miR-7852-3p,hsa-miR-17-5p,hsa-miR-4321,hsa-miR-758-3p"

    # Minimum Score
    # - Use one of those:'Very High', 'High', 'Medium', 'Low' .
    # - Mind exact spelling.
    minimumScore = "Very High"

    # Sources
    # - Use only combination of those:
    #      bitargeting_May_2021, BCmicrO, CoMeTa, Cupid, DIANA, miranda_May_2021,
    #      mirbase, mirCoX, mirmap_May_2021, mirzag, miRcode, miRDB_v6, miRTar2GO,
    #      MBStar, MirAncesTar, MirSNPInTarget, MirTar2, MiRNATIP, MultiMiTar, PACCMIT,
    #      PITA_May_2021, rnahybrid_May_2021, RNA22, TargetScan_v7_2
    # -Mind exact spelling
    sources <- toString(paste(
            "bitargeting_May_2021, BCmicrO, CoMeTa, Cupid, DIANA, miranda_May_2021, ",
            "mirbase, mirCoX, mirmap_May_2021, mirzag, miRcode, miRDB_v6, miRTar2GO, ",
            "MBStar, MirAncesTar, MirSNPInTarget, MirTar2, MiRNATIP, MultiMiTar, PACCMIT, ",
            "PITA_May_2021, rnahybrid_May_2021, RNA22, TargetScan_v7_2", collapse = ""))

    # Data
    # Database Occurrences(named as 'Number of Sources' on 'Bidirectional search' web page):
    # - Use this option to select microRNA target predictions that are
    #   present in at least a given number of sources - irrespective
    #   of what those sources are.
    # - The valid values are:from 1 to 24
    occurrances = 2

    res <- bidirectionalSearch(geneSymbols, microRNAs, minimumScore, sources, occurrances)

    responseCode = status_code(res)
    if (responseCode != 200) {

        cat("\r\n", "Error: Response Code : ", responseCode, "\r\n")
    } else {

        list_map <- makeMap(res)

        # print results
        cat("\r\n", "Bidirectional Search:", "\r\n")

        cat("Generated at: ", unlist(list_map["generated_at"]), "\r\n")
        cat("Gene Symbols: ", unlist(list_map["gene_symbols"]), "\r\n")
        cat("Micro RNAs: ", unlist(list_map["micro_rnas"]), "\r\n")
        cat("Minimum Score: ", unlist(list_map["minimum_score"]), "\r\n")
        cat("Database Occurrences: ", unlist(list_map["dbOccurrences"]), "\r\n")
        cat("Source Filter: ", unlist(list_map["sources"]), "\r\n")

        cat("\r\n", "Results Size: ", unlist(list_map["results_size"]), "\r\n")
        cat("Results: \r\n", unlist(list_map["results"]), "\r\n") # formatted as tab - delimited spreadsheet
    }
}







All contents copyright: Jurisica Lab, Schroeder Arthritis Institute, Krembil Research Institute - the University Health Network, Toronto, Canada. Last modified Jan 26, 2024. (Version 5.3.0.2, Database version 5.2.3.1)

All downloads and use of this database are subject to the following terms.

Permission to use, copy, and modify this database hereby granted to all academic and not-for-profit institutions without fee, provided that name of organization and author appear in all copies of the database. Under these conditions, the permission to modify and distribute or to make extended versions of the database is explicitly granted to non-profit organizations. All commercial entities willing to download or use the database must contact the authors. This database is provided "AS-IS" and with out any warranty of any kind. In no event shall Krembil Research Institute - the University Health Network or the authors be liable for any consequential damage of any kind, or any damages resulting from the use of this database.

Reference:
- Tokar T, Pastrello C, Rossos AEM, Abovsky M, Hauschild AC, Tsay M, Lu R, Jurisica I. mirDIP 4.1-integrative database of human microRNA target predictions. Nucleic Acids Res. 2018 Jan 4;46(D1):D360-D370. doi: 10.1093/nar/gkx1144. PubMed PMID: 29194489; PubMed Central PMCID: PMC5753284
- Shirdel EA, Xie W, Mak TW, Jurisica I, 2011 NAViGaTing the Micronome. Using Multiple MicroRNA Prediction Databases to Identify Signalling Pathway-Associated MicroRNAs. PLoS ONE 6(2): e17429. doi:10.1371/journal.pone.0017429