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.9.0 |
Built: | 2024-10-30 08:28:49 UTC |
Source: | https://github.com/bioc/NetActivity |
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.
computeGeneSetScores(SE, model, annot = NULL)
computeGeneSetScores(SE, model, annot = NULL)
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. |
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].
A 'SummarizedExperiment' with the gene set scores.
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")
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 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.
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.
prepareSummarizedExperiment(SE, model)
prepareSummarizedExperiment(SE, model)
SE |
A 'SummarizedExperiment' |
model |
A string matching a model in 'NetActivityData' or a custom 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].
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.
A 'SummarizedExperiment' with the data prepared for gene set score computation with 'computeGeneSetScores'
library(airway) data(airway) ddsSE <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex) vst <- DESeq2::varianceStabilizingTransformation(ddsSE) out <- prepareSummarizedExperiment(vst, "gtex_gokegg")
library(airway) data(airway) ddsSE <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex) vst <- DESeq2::varianceStabilizingTransformation(ddsSE) out <- prepareSummarizedExperiment(vst, "gtex_gokegg")