HMX | R Documentation |
ImmuneSpace connection object with additional methods for gene expression analysis
ImmuneSpaceR::ImmuneSpaceConnection
-> HIPCMatrixConn
immune_response_predictors
List of ImmuneResponsePredictor
objects associated with this connection. Created by HMS$run_irp()
ImmuneSpaceR::ImmuneSpaceConnection$addTreatment()
ImmuneSpaceR::ImmuneSpaceConnection$clearCache()
ImmuneSpaceR::ImmuneSpaceConnection$downloadGEFiles()
ImmuneSpaceR::ImmuneSpaceConnection$getDataset()
ImmuneSpaceR::ImmuneSpaceConnection$getGEAnalysis()
ImmuneSpaceR::ImmuneSpaceConnection$getGEFiles()
ImmuneSpaceR::ImmuneSpaceConnection$getGEInputs()
ImmuneSpaceR::ImmuneSpaceConnection$getGEMatrix()
ImmuneSpaceR::ImmuneSpaceConnection$getParticipantData()
ImmuneSpaceR::ImmuneSpaceConnection$getParticipantGEMatrix()
ImmuneSpaceR::ImmuneSpaceConnection$initialize()
ImmuneSpaceR::ImmuneSpaceConnection$listDatasets()
ImmuneSpaceR::ImmuneSpaceConnection$listGEAnalysis()
ImmuneSpaceR::ImmuneSpaceConnection$listGEMatrices()
ImmuneSpaceR::ImmuneSpaceConnection$listGatingSets()
ImmuneSpaceR::ImmuneSpaceConnection$listParticipantGEMatrices()
ImmuneSpaceR::ImmuneSpaceConnection$listParticipantGroups()
ImmuneSpaceR::ImmuneSpaceConnection$listWorkspaces()
ImmuneSpaceR::ImmuneSpaceConnection$loadGatingSet()
ImmuneSpaceR::ImmuneSpaceConnection$mapSampleNames()
ImmuneSpaceR::ImmuneSpaceConnection$plot()
ImmuneSpaceR::ImmuneSpaceConnection$print()
ImmuneSpaceR::ImmuneSpaceConnection$summarizeCyto()
ImmuneSpaceR::ImmuneSpaceConnection$summarizeGatingSet()
run_de_analysis()
Run Differential Expression analysis on matrices in a study
HMX$run_de_analysis(rerun = FALSE)
rerun
Force re-run if results already in cache?
upload_de_analysis_results()
Upload differential gene expression analysis results to server. This updates the gene_expression_analysis and the gene_expression_analysis_results tables with updated results.
HMX$upload_de_analysis_results()
get_de_compatible_runs()
Find gene expression matrices and timepoints which are compatible with differential expression analysis
HMX$get_de_compatible_runs()
data.table with one row per timepoint per matrix which has sufficient data to run differential expression analysis
updateFAS()
Update Microarray.FeatureAnnotation table
HMX$updateFAS(fas_names = NULL)
fas_names
name of feature annotation set. If NULL, any FAS associated with matrices associated with the connection will be updated. For global connection, all FAS will be updated.
This will take care of GeneExpressionExplorer Module, which uses
the Microarray.FeatureAnnotation table to populate a dropdown for selection
of genes of interest. GEE will look for the FASid that was given to the original
FAS when it was uploaded and this is challenging to change, therefore
it was decided to move the original to a new FAS called "myOriginalFasName_orig"
that gets a new FASid. Con$getGEMatrix() then looks for this new FASid when
populating the probe level gene symbols with the arg: annotation = "default"
.
updateEMs()
Update Expression Matrices with new annotation
HMX$updateEMs()
This will update the summary.tsv files for all matrices associated with the connection by re-calculating the summarized expression values with the most current prob to gene symbol mapping.
get_immune_response()
Get immune response.
HMX$get_immune_response( assay = "hai", participant_ids = NULL, dichotomize = FALSE, dichotomize_thresh = 4, reload = FALSE )
assay
"hai", "neut_ab_response", or "elisa"
participant_ids
character vector of participant_ids
dichotomize
Dichotomize result? If FALSE, max log fold change is
returned. If TRUE, returns TRUE if max log fold change is greater than
dichotomize_value
dichotomize_thresh
Value to use for dichotomizing result if
dichotomize
is TRUE.
reload
Force rerun if result is already found in cache?
Max log fold change of assay
from baseline for each
particiapnt.
get_de_genes()
Get genes differentially expressed over time
HMX$get_de_genes( timepoint, fc_thresh = 0.58, timepoint_unit = "Days", cohorts = NULL, reload = FALSE )
timepoint
Timepoint for finding differentially expressed genes
fc_thresh
fold-change threshold for determining whether genes are differentially expressed
timepoint_unit
"Days" or "Hours"
cohorts
character vector of cohorts to include
reload
Force rerun if result is already found in cache?
train_immune_response_predictors()
Get immune response predictors
HMX$train_immune_response_predictors( cohorts, timepoint, assay = "hai", timepoint_unit = "Days", use_only_de_genes = timepoint > 0, fc_thresh = 0.58, dichotomize = FALSE, dichotomize_thresh = 4, reload = FALSE )
cohorts
character vector of cohorts to include
timepoint
Timepoint for finding differentially expressed genes
assay
"hai", "neut_ab_response", or "elisa"
timepoint_unit
"Days" or "Hours"
use_only_de_genes
Filter to differentially expressed genes when finding predictors?
fc_thresh
fold-change threshold for determining whether genes
are differentially expressed. Ignored if use_only_de_genes
is
FALSE
.
dichotomize
Dichotomize result? If FALSE, max log fold change is
returned. If TRUE, returns TRUE if max log fold change is greater than
dichotomize_value
dichotomize_thresh
Value to use for dichotomizing result if
dichotomize
is TRUE.
reload
Force rerun if result is already found in cache?
Invisibly returns irp_index
which can be used to
access the ImmuneResponsePredictor object with HMX$get_irp()
get_irp()
Get ImmuneResponsePredictor
HMX$get_irp(irp_index = NULL)
irp_index
index of immune_response_predictor object in HMX
predict_response()
Test immune response predictor model on testing cohort data.
HMX$predict_response(cohort, irp_index = NULL)
cohort
cohort to use (string)
irp_index
index of immune_response_predictor object in HMX
test_immune_response_predictors()
get a table of observed vs predicted values given a fitted model.
HMX$test_immune_response_predictors(cohorts, irp_index = NULL, reload = FALSE)
cohorts
cohorts to test
irp_index
irp_index
reload
force re-run if already cached?
run_irp()
Find predictors of immune response from gene expression.
HMX$run_irp( cohorts_train, cohorts_test = NULL, timepoint, use_only_de_genes = timepoint > 0, assay = "hai", timepoint_unit = "Days", fc_thresh = 0.58, dichotomize = FALSE, dichotomize_thresh = 4, reload = FALSE )
cohorts_train
Training cohorts
cohorts_test
Testing cohorts (optional)
timepoint
Timepoint for finding differentially expressed genes
use_only_de_genes
Filter to differentially expressed genes when finding predictors?
assay
"hai", "neut_ab_response", or "elisa"
timepoint_unit
"Days" or "Hours"
fc_thresh
fold-change threshold for determining whether genes
are differentially expressed. Ignored if use_only_de_genes
is
FALSE
.
dichotomize
Dichotomize result? If FALSE, max log fold change is
returned. If TRUE, returns TRUE if max log fold change is greater than
dichotomize_value
dichotomize_thresh
Value to use for dichotomizing result if
dichotomize
is TRUE.
reload
Force rerun if result is already found in cache?
run_gsea()
Run a gene set enrichment analysis on a gene expression matrix, comparing all timepoints to baseline. The CAMERA method from the limma package is used, as described in https://academic.oup.com/nar/article/40/17/e133/2411151Wu and Smyth (2012)
HMX$run_gsea( matrix_name = NULL, cohort_type = NULL, set_name = "msigdb", gene_sets = NULL )
matrix_name
The name of the gene expression matrix to download.
cohort_type
The name of a cohortType that has an
associated gene expression matrix. Note that if this argument is not
NULL, then matrixName
is ignored. CohortType is a concatenation of
"cohort" and "cell type" that allows the user to specify a matrix for the
cell type subset of a cohort.
set_name
Name of predefined set of gene signatures. Choose from:
chaussabel
, blood_transcription
, msigdb
gene_sets
A list of vectors of gene names, each entry corresponding to a gene set. If specified, this will be used in place of the "set_name" argument to test gene sets.
clone()
The objects of this class are cloneable with this method.
HMX$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.