Skip to content

Instantly share code, notes, and snippets.

@yochannah
Last active June 25, 2019 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yochannah/e3a4b7c8f967b4994e127cd053d76516 to your computer and use it in GitHub Desktop.
Save yochannah/e3a4b7c8f967b4994e127cd053d76516 to your computer and use it in GitHub Desktop.
Fetch WormMine enrichment results for various scenarios
#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
#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