HMX: HIPCMatrix Connection

HMXR Documentation

HIPCMatrix Connection

Description

ImmuneSpace connection object with additional methods for gene expression analysis

Super class

ImmuneSpaceR::ImmuneSpaceConnection -> HIPCMatrixConn

Public fields

immune_response_predictors

List of ImmuneResponsePredictor objects associated with this connection. Created by HMS$run_irp()

Methods

Public methods

Inherited methods

Method run_de_analysis()

Run Differential Expression analysis on matrices in a study

Usage
HMX$run_de_analysis(rerun = FALSE)
Arguments
rerun

Force re-run if results already in cache?


Method 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.

Usage
HMX$upload_de_analysis_results()

Method get_de_compatible_runs()

Find gene expression matrices and timepoints which are compatible with differential expression analysis

Usage
HMX$get_de_compatible_runs()
Returns

data.table with one row per timepoint per matrix which has sufficient data to run differential expression analysis


Method updateFAS()

Update Microarray.FeatureAnnotation table

Usage
HMX$updateFAS(fas_names = NULL)
Arguments
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.

Details

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".


Method updateEMs()

Update Expression Matrices with new annotation

Usage
HMX$updateEMs()
Details

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.


Method get_immune_response()

Get immune response.

Usage
HMX$get_immune_response(
  assay = "hai",
  participant_ids = NULL,
  dichotomize = FALSE,
  dichotomize_thresh = 4,
  reload = FALSE
)
Arguments
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?

Returns

Max log fold change of assay from baseline for each particiapnt.


Method get_de_genes()

Get genes differentially expressed over time

Usage
HMX$get_de_genes(
  timepoint,
  fc_thresh = 0.58,
  timepoint_unit = "Days",
  cohorts = NULL,
  reload = FALSE
)
Arguments
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?


Method train_immune_response_predictors()

Get immune response predictors

Usage
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
)
Arguments
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?

Returns

Invisibly returns irp_index which can be used to access the ImmuneResponsePredictor object with HMX$get_irp()


Method get_irp()

Get ImmuneResponsePredictor

Usage
HMX$get_irp(irp_index = NULL)
Arguments
irp_index

index of immune_response_predictor object in HMX


Method predict_response()

Test immune response predictor model on testing cohort data.

Usage
HMX$predict_response(cohort, irp_index = NULL)
Arguments
cohort

cohort to use (string)

irp_index

index of immune_response_predictor object in HMX


Method test_immune_response_predictors()

get a table of observed vs predicted values given a fitted model.

Usage
HMX$test_immune_response_predictors(cohorts, irp_index = NULL, reload = FALSE)
Arguments
cohorts

cohorts to test

irp_index

irp_index

reload

force re-run if already cached?


Method run_irp()

Find predictors of immune response from gene expression.

Usage
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
)
Arguments
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?


Method 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)

Usage
HMX$run_gsea(
  matrix_name = NULL,
  cohort_type = NULL,
  set_name = "msigdb",
  gene_sets = NULL
)
Arguments
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.


Method clone()

The objects of this class are cloneable with this method.

Usage
HMX$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


RGLab/HIPCMatrix documentation built on Jan. 29, 2023, 5:13 a.m.