This is a test version of Biostars. For the public version, visit https://www.biostars.org.
The aggregated expression of several genes

Hello everyone!

Is there a way to calculate the summed expression of a group of genes in R? I know about the function AggregateExpression in Seurat but it does not take the list of genes in features argument.

Thanks!

seurat rna-seq r aggregateexpression

What have you already tried? What is the structure of your gene expression object? These details help us to make appropriate suggestions.

if you have a matrix of gene counts where the row names are genes and columns are samples, you can try the following:

# vector of genes of interest
genes <- c("Gene1", "Gene2", "Gene3")

# get vector of aggregated gene expression for each column in my gene count matrix
aggregated <- apply(gene_counts[genes,], 2, sum)

0 answers

No answers yet.

Log in to answer this question.