Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ImmuneSpaceR

Build Status codecov bioc bioc

A thin wrapper around Rlabkey to access the ImmuneSpace database from R.

This package simplifies access to the HIPC ImmuneSpace database for R programmers. It takes advantage of the standardization of the database to hide all the Rlabkey specific code away from the user. The study-specific datasets can be accessed via an object-oriented paradigm.

Installation

Install from Bioconductor:

install.packages("BiocManager")
BiocManager::install("ImmuneSpaceR")

Or install the latest development version via remotes:

install.packages("remotes")
remotes::install_github("RGLab/ImmuneSpaceR")

Configuration

The ImmuneSpace Portal can be accessed via ImmuneSpaceR with the user's credentials. A .netrc file storing login and password information is required.

  1. Register
  2. Create a netrc file with your ImmuneSpace credetntials using interactive_netrc() function in R:
library(ImmuneSpaceR)
interactive_netrc()

If you're familiar with the command-line interface, see the introductory vignette.

Usage

Create a connection

The general idea is that the user creates an instance of an ImmuneSpaceConnection class. The instance configures itself to connect to a specific study, and datasets and gene expression matrices can be retrieved by name.

For example:

library(ImmuneSpaceR)
con <- CreateConnection("SDY269")

will create an instance of SDY269.

List datasets

Datasets can be listed by:

con$listDatasets()
#> datasets
#>  gene_expression_files
#>  fcs_sample_files
#>  demographics
#>  elispot
#>  hai
#>  elisa
#>  pcr
#>  cohort_membership
#>  fcs_analyzed_result
#> Expression Matrices
#>  SDY269_PBMC_TIV_Geo
#>  SDY269_PBMC_LAIV_Geo

which will print names of available datasets and gene expression matrices.

Retrieve datasets

Gene expression matrices or datasets can be retreived by:

LAIV2008 <- con$getGEMatrix("SDY269_PBMC_LAIV_Geo")
#> Downloading matrix..
#> Constructing ExpressionSet
elisa <- con$getDataset("elisa")

The connection object caches data, so once it is retrieved, the next time you access it, it will use the local cached copy. The package uses a R6 class system to represent the connection to a study and get around some of R's copy-on-change behaviour.

Visualize

The plot method uses ggplot2 functions to generate visualizations of datasets, leveraging the standardized dataset tables.

con$plot("hai")

Examples & Documentation

For more advanced examples and detailed documentation, see the package vignettes and the reports available on ImmuneSpace.

Contributing

If you'd like to report bugs/issues/feature requests or contribute to the package, please see the contributing guidelines and join our Slack workspace.

You can’t perform that action at this time.