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
dataset_id="the_dataset_id_you_want"
path_to_dir_output="/output/directory"
DL_dataset(IData, IData_session, dataset_id, )
# To download all annotations for files in a dataset
DL_dataset_annotation(IData, IData_session, dataset_id, path_to_dir_output)
# To download a file using file db_id or slug_id
DL_file(IData, IData_session, file_id, path_to_dir_output)
# To download a file annotations using file db_id or slug_id
DL_file_annotation(IData, IData_session, file_id, path_to_dir_output)
# To upload a file, annotation as a named list or JSON formated character.
path_to_file_output='/path/to/my/file.txt'
file_upload(IData, IData_session, path_to_file_output, 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)