Last active
June 25, 2019 15:57
-
-
Save yochannah/e3a4b7c8f967b4994e127cd053d76516 to your computer and use it in GitHub Desktop.
Fetch WormMine enrichment results for various scenarios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#load InterMineR | |
library(InterMineR) | |
# Select WormMine | |
wormMine <- listMines()["WormMine"] | |
im <- initInterMine(mine=wormMine) # IMPORTANT: ADD YOUR TOKEN HERE IF THIS IS A LIST YOU SAVE TO YOUR OWN ACCOUNT | |
# EXAMPLE: im <- initInterMine(mine=wormMine, "YOUR TOKEN") | |
# fetch the list of widgets available from WormMine | |
widgets <- getWidgets(im) | |
print(widgets) # look at the list of widgets - we want go_enrichment_for_gene | |
# Run the enrichment | |
GOEnrichmentResult = doEnrichment( | |
im = im, | |
genelist = "Genes with no life span phenotype (and RNAi not observed) WS265", # This is a public list on WormMine | |
widget = "go_enrichment_for_gene" | |
) | |
# Print the results | |
GOEnrichmentResult | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#load InterMineR | |
library(InterMineR) | |
# Select WormMine | |
wormMine <- listMines()["WormMine"] | |
im <- initInterMine(mine=wormMine) # IMPORTANT: ADD YOUR TOKEN HERE IF THIS IS A LIST YOU SAVE TO YOUR OWN ACCOUNT | |
# EXAMPLE: im <- initInterMine(mine=wormMine, "YOUR TOKEN") | |
# fetch the list of widgets available from WormMine | |
widgets <- getWidgets(im) | |
print(widgets) # look at the list of widgets - we want go_enrichment_for_gene | |
# List of gene IDs I want to enrich on: | |
myGenes <- c("WBGene00001171","WBGene00001190","WBGene00001202","WBGene00001374") | |
# Run the enrichment | |
GOEnrichmentResult = doEnrichment( | |
im = im, | |
ids = myGenes, | |
widget = "go_enrichment_for_gene" | |
) | |
# Print the results | |
GOEnrichmentResult | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment