Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEG rdata annotation assumes human reference #41

Open
epartan opened this issue Jul 15, 2024 · 1 comment
Open

DEG rdata annotation assumes human reference #41

epartan opened this issue Jul 15, 2024 · 1 comment

Comments

@epartan
Copy link

epartan commented Jul 15, 2024

DEG template, load_counts_data chunk to create rdata object from AnnotationDbi

rdata = AnnotationDbi::select(org.Hs.eg.db, rownames(counts), 'SYMBOL', 'ENSEMBL') %>% dplyr::select(gene_id = ENSEMBL, gene_name = SYMBOL)
Assumes human reference

Should base reference used off of genome set in parameters at top of file

If using mouse reference, need the following:

  1. In libraries:
    # BiocManager::install("org.Mm.eg.db")
    library(org.Mm.eg.db)

  2. In load_counts_data chunk to create rdata object
    rdata = AnnotationDbi::select(org.Mm.eg.db, rownames(counts), 'SYMBOL', 'ENSEMBL') %>% dplyr::select(gene_id = ENSEMBL, gene_name = SYMBOL)

@epartan
Copy link
Author

epartan commented Jul 15, 2024

This is also true in the Pathway Enrichment section at the end of the DEG template.

Need to change org.Hs.eg.db > org.Mm.eg.db and "human" to "Mus musculus"

universe=res %>% filter(!is.na(padj)) %>% pull(gene_id)
mapping = AnnotationDbi::select(org.Mm.eg.db, universe, 'ENTREZID', 'ENSEMBL')

all_in_life=list(
msigdbr(species = "Mus musculus", category = "H") %>% mutate(gs_subcat="Hallmark"),
msigdbr(species = "Mus musculus", category = "C2", subcategory = "CP:REACTOME"),
msigdbr(species = "Mus musculus", category = "C2", subcategory = "CP:KEGG"),
msigdbr(species = "Mus musculus", category = "C2", subcategory = "CP:PID"),
msigdbr(species = "Mus musculus", category = "C5", subcategory = "GO:BP"),
msigdbr(species = "Mus musculus", category = "C5", subcategory = "GO:MF"),
msigdbr(species = "Mus musculus", category = "C5", subcategory = "HPO"),
msigdbr(species = "Mus musculus", category = "C3", subcategory = "TFT:GTRD"),
msigdbr(species = "Mus musculus", category = "C6") %>% mutate(gs_subcat="Oncogenic")
)

ora_input = res %>% filter(!is.na(padj), padj<0.01, abs(lfc)>0.3) %>% pull(gene_id)
input_entrezid <- AnnotationDbi::select(org.Mm.eg.db, ora_input, 'ENSEMBL', columns = c('ENTREZID', 'SYMBOL'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant