An R package to access to Omics Discovery Index API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
inst
man
tests
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
README.md
ddiR.Rproj
ddiRCache.RData
outfile.txt
outputFileBiology.csv
resume.RData

README.md

ddiR

An R package to obtain data from the Omics Discovery Index (OmicsDI. It uses its RESTful Web Services at OmicsDI WS for that purpose.

Currently, the following domain entities are supported:

  • Dataset as S4 objects, including methods to get them from OmicsDI by accession and as.data.frame
  • Publication as S4 objects, including methods to get them from OmicsDI by accession and as.data.frame
  • Term as S4 objects, including methods to get them from OmicsDI by term and as.data.frame

Installation

First, we need to install devtools:

install.packages("devtools")
library(devtools)

Then we just call

install_github("BD2K-DDI/ddiR")
library(ddiR)

Examples

This exmaple shows how retrieve all the metadata similarity scores by using the R-package ddiR.

library(ddiR)
datasets <- search.DatasetsSummary(query = "*:*")
i  = 0
sink("outfile.txt")
for(datasetCount in seq(from = 0, to = datasets@count, by = 100)){

    datasets <- search.DatasetsSummary(query = "*:*", start = datasetCount, size = 100)

    for(dataset in datasets@datasets){
            DatasetDetail = get.DatasetDetail(accession = dataset@dataset.id, database = dataset@database)
            Similar = get.MetadataSimilars(accession = dataset@dataset.id, database = dataset@database)
            rank = 0
            for(similarDataset in Similar@datasets){
                print(paste(dataset@dataset.id, similarDataset@dataset.id, similarDataset@score, dataset@omics.type, rank))
                rank = rank + 1
            }
    }
}
sink()

Find out about us in our GitHub profiles:

Yasset Perez-Riverol
Ariana Barbera Betancourt