Skip to content
Snippets Groups Projects
Name Last commit Last update
R
man
.gitignore
DESCRIPTION
LICENSE
NAMESPACE
README.md

Riricdata

Overview

Riricdata is an API of IRIC_data which allow to download and upload files.

Installation

# install.packages("devtools")
devtools::install_gitlab("bioinfo_iric/riricdata", host="https://gitlab.iric.ca/")

Usage

library(Riricdata)
# Create IRICData object
#   By default IRIC_data url will be "https://thepond.bioinfo.iric.ca"
#   You can change it by adding url="your_url"
IData = IRICData(user="your_SIM_ids")

# Open a session
#   This cmd will ask your pwd
IData_session = open_session(IData)

# To download a dataset
DL_dataset(IData, IData_session, [the_dataset_id_you_want], "directory/output/path")

# To download all annotations for files in a dataset
DL_dataset_annotation(IData, IData_session, [the_dataset_id_you_want], "directory/output/path")

# To download a file using file db_id or slug_id
DL_file(IData, IData_session, file_id, "directory/output/path")

# To download a file annotations using file db_id or slug_id
DL_file_annotation(IData, IData_session, file_id, "directory/output/path")

# To upload a file
file_upload(IData, IData_session, '/path/to/my/file.txt', annotation, lab, dataset)

# To get file metadata using file db_id or slud_id
get_file_metadata(IData, IData_session, file_id)

# To get file annotation using file db_id or slud_id
get_file_annotation(IData, IData_session, file_id)

# To get all available datasets for the current user
get_available_dataset(IData, IData_session)

#To get file name, db_id and hash for files in a dataset
get_dataset_hash(IData, IData_session, dataset_id)

# To upload a file (To be continued)