Could you please tell me how can I access inflammatory genes for certain organs to study like wanna study inflammatory genes in HCC, I just want to have inflammatory genes as a set
Accessing particular gene set with msigdbr on R
I want to access specifically the gene set at https://www.gsea-msigdb.org/gsea/msigdb/cards/IVANOVA_HEMATOPOIESIS_STEM_CELL using msigdbr on R 4.1.3.
However, I can only refer to gene sets using category and subcategory - but this fetches me thousands of gene sets, rather than the unique one that I want.
So, how can I get only the unique gene set above?
• 2,020 views
•
link
1 answer
One way is to use grep on the msigdb tibble to select the gene sets that match the query:
> library("msigdbr")
> msigdb_gene_sets <- msigdbr(species = "human")
> myset <- msigdb_gene_sets[grep("ivanova_hematopoiesis",msigdb_gene_sets$gs_name,ignore.case=TRUE),]
but that results in several matches
[1] "IVANOVA_HEMATOPOIESIS_EARLY_PROGENITOR"
[2] "IVANOVA_HEMATOPOIESIS_INTERMEDIATE_PROGENITOR"
[3] "IVANOVA_HEMATOPOIESIS_LATE_PROGENITOR"
[4] "IVANOVA_HEMATOPOIESIS_MATURE_CELL"
[5] "IVANOVA_HEMATOPOIESIS_STEM_CELL"
[6] "IVANOVA_HEMATOPOIESIS_STEM_CELL_AND_PROGENITOR"
[7] "IVANOVA_HEMATOPOIESIS_STEM_CELL_LONG_TERM"
[8] "IVANOVA_HEMATOPOIESIS_STEM_CELL_SHORT_TERM"
so the subset command can be used to get the exact gene set.
> myset <- subset(msigdb_gene_sets, gs_name=="IVANOVA_HEMATOPOIESIS_STEM_CELL")
> dim(myset)
[1] 208 15
• 0 views
•
link
• 0 views
•
link
Log in to answer this question.