Package 'NetActivity'

Title: Compute gene set scores from a deep learning framework
Description: #' NetActivity enables to compute gene set scores from previously trained sparsely-connected autoencoders. The package contains a function to prepare the data (`prepareSummarizedExperiment`) and a function to compute the gene set scores (`computeGeneSetScores`). The package `NetActivityData` contains different pre-trained models to be directly applied to the data. Alternatively, the users might use the package to compute gene set scores using custom models.
Authors: Carlos Ruiz-Arenas [aut, cre]
Maintainer: Carlos Ruiz-Arenas <[email protected]>
License: MIT + file LICENSE
Version: 1.7.0
Built: 2024-06-30 02:44:05 UTC
Source: https://github.com/bioc/NetActivity

Help Index


Compute gene set scores

Description

This function will compute the gene set scores using gene weights previously computed. The package 'NetActivityData' contains different pre-trained models that can be used to compute the gene set scores. Models included in 'NetActivityData' also includes gene set annotation.

Usage

computeGeneSetScores(SE, model, annot = NULL)

Arguments

SE

A 'SummarizedExperiment'

model

A string matching a model in 'NetActivityData' or a custom matrix.

annot

A 'data.frame' with the gene set annotation, only when using a custom model.

Details

This function can also compute the gene set scores for a model not present in 'NetActivityData'. In this case, 'model' should be a matrix where the columns are the genes and the rows the gene sets. When using a custom model, we can add the gene set annotation using the 'annot' paramenter. 'annot' parameter should contain a column named 'GeneSet' matching the gene set ids from the weights matrix (rownames of weights matrix).

Notice that the function will not accept raw count data. We recommend to convert count data to continuous values using the Variant Stabilization Transformation from [DESeq2::varianceStabilizingTransformation].

Value

A 'SummarizedExperiment' with the gene set scores.

Examples

library(airway)
data(airway)
ddsSE <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex)
vst <- DESeq2::varianceStabilizingTransformation(ddsSE)
out <- prepareSummarizedExperiment(vst, "gtex_gokegg")
scores <- computeGeneSetScores(out, "gtex_gokegg")

NetActivity: compute gene set scores from a deep learning framework

Description

NetActivity enables to compute gene set scores from previously trained sparsely-connected autoencoders. The package contains a function to prepare the data ('prepareSummarizedExperiment') and a function to compute the gene set scores ('computeGeneSetScores'). The package 'NetActivityData' contains different pre-trained models to be directly applied to the data. Alternatively, the users might use the package to compute gene set scores using custom models.


Prepare a SummarizedExperiment for computing gene set scores computation

Description

This function will prepare the data for the computation of gene set scores. The function will perform two steps. First, the function will check whether the genes present in the trained model are present in the input 'SummarizedExperiment'. Missing genes will be set to 0 for all samples. Second, the function will standardize the gene expression values, so gene values have a mean of 0 and a standard deviation of 1.

Usage

prepareSummarizedExperiment(SE, model)

Arguments

SE

A 'SummarizedExperiment'

model

A string matching a model in 'NetActivityData' or a custom matrix.

Details

Notice that the function will not accept raw count data. We recommend to convert count data to continuous values using the Variant Stabilization Transformation from [DESeq2::varianceStabilizingTransformation].

This function can also prepare the data for a model not present in 'NetActivityData'. In this case, 'param' should be a matrix where the columns are the genes and the rows the gene sets.

Value

A 'SummarizedExperiment' with the data prepared for gene set score computation with 'computeGeneSetScores'

Examples

library(airway)
data(airway)
ddsSE <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex)
vst <- DESeq2::varianceStabilizingTransformation(ddsSE)
out <- prepareSummarizedExperiment(vst, "gtex_gokegg")