getMsigdbGenesets

getMsigdbGenesets(msigCollection, species)

Arguments

msigCollection

data.frema with columns gs_cat, gs_subcat

species

e.g. "Homo sapiens"

See also

Examples

library(tidyverse)
#> -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
#> v ggplot2 3.3.5     v purrr   0.3.4
#> v tibble  3.1.4     v dplyr   1.0.7
#> v tidyr   1.1.3     v stringr 1.4.0
#> v readr   2.0.1     v forcats 0.5.1
#> -- Conflicts ------------------------------------------ tidyverse_conflicts() --
#> x dplyr::collapse()   masks IRanges::collapse()
#> x dplyr::combine()    masks Biobase::combine(), BiocGenerics::combine()
#> x dplyr::desc()       masks IRanges::desc()
#> x tidyr::expand()     masks S4Vectors::expand()
#> x dplyr::filter()     masks stats::filter()
#> x dplyr::first()      masks S4Vectors::first()
#> x dplyr::lag()        masks stats::lag()
#> x ggplot2::Position() masks BiocGenerics::Position(), base::Position()
#> x purrr::reduce()     masks IRanges::reduce()
#> x dplyr::rename()     masks S4Vectors::rename()
#> x dplyr::select()     masks AnnotationDbi::select()
#> x dplyr::slice()      masks IRanges::slice()
library(msigdbr)
msigdbr::msigdbr_species()
#> # A tibble: 20 x 2
#>    species_name                    species_common_name                          
#>    <chr>                           <chr>                                        
#>  1 Anolis carolinensis             Carolina anole, green anole                  
#>  2 Bos taurus                      bovine, cattle, cow, dairy cow, domestic cat~
#>  3 Caenorhabditis elegans          roundworm                                    
#>  4 Canis lupus familiaris          dog, dogs                                    
#>  5 Danio rerio                     leopard danio, zebra danio, zebra fish, zebr~
#>  6 Drosophila melanogaster         fruit fly                                    
#>  7 Equus caballus                  domestic horse, equine, horse                
#>  8 Felis catus                     cat, cats, domestic cat                      
#>  9 Gallus gallus                   bantam, chicken, chickens, Gallus domesticus 
#> 10 Homo sapiens                    human                                        
#> 11 Macaca mulatta                  rhesus macaque, rhesus macaques, Rhesus monk~
#> 12 Monodelphis domestica           gray short-tailed opossum                    
#> 13 Mus musculus                    house mouse, mouse                           
#> 14 Ornithorhynchus anatinus        duck-billed platypus, duckbill platypus, pla~
#> 15 Pan troglodytes                 chimpanzee                                   
#> 16 Rattus norvegicus               brown rat, Norway rat, rat, rats             
#> 17 Saccharomyces cerevisiae        baker's yeast, brewer's yeast, S. cerevisiae 
#> 18 Schizosaccharomyces pombe 972h- NA                                           
#> 19 Sus scrofa                      pig, pigs, swine, wild boar                  
#> 20 Xenopus tropicalis              tropical clawed frog, western clawed frog    
species <- "Homo sapiens"
species <- "Mus musculus"

hallmark <- msigdbr_collections() %>% filter(.data$gs_cat == "H")

#hallmark$gs_subcat <- "HALLMARK"
C5 <- bind_rows( {msigdbr_collections() %>%
 filter(.data$gs_cat == "C5") %>%
 filter(grepl("^GO:", .data$gs_subcat))},
 hallmark,
 {msigdbr_collections() %>% filter(.data$gs_subcat == "CP:KEGG")} )

C5
#> # A tibble: 5 x 3
#>   gs_cat gs_subcat num_genesets
#>   <chr>  <chr>            <int>
#> 1 C5     "GO:BP"           7481
#> 2 C5     "GO:CC"            996
#> 3 C5     "GO:MF"           1708
#> 4 H      ""                  50
#> 5 C2     "CP:KEGG"          186
fgseaGSlist <- prora::getMsigdbGenesets(C5, species)