library(GSNA)
# From a differential expression data set, we can generate a
# subset of genes with significant differential expression,
# up or down. Here we will extract genes with significant
# negative differential expression with
# avg_log2FC < 0 and p_val_adj <= 0.05 from **Seurat** data:
sig_DN.genes <-
toupper( rownames(subset( Bai_CiHep_v_Fib2.de,
avg_log2FC < 0 & p_val_adj < 0.05 )))
# Using all the genes in the differential expression data set,
# we can obtain a suitable background:
bg <- toupper(rownames( Bai_CiHep_v_Fib2.de ))
# Now, we can do a overrepresentation analysis search on this
# data using the Bai_gsc.tmod gene set collection included in
# the sample data:
sig_DN.gsnora <- gsnORAtest( l = sig_DN.genes,
bg = bg,
geneSetCollection = Bai_gsc.tmod )
Run the code above in your browser using DataLab