Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active June 12, 2016 13:46
Show Gist options
  • Select an option

  • Save kozo2/9341cc0a549991320c310cbecba2dcc7 to your computer and use it in GitHub Desktop.

Select an option

Save kozo2/9341cc0a549991320c310cbecba2dcc7 to your computer and use it in GitHub Desktop.
biohack16
library(SPARQL) # SPARQL querying package
endpoint <- "http://sparql.uniprot.org/"
# create query statement
query <-
"
PREFIX up:<http://purl.uniprot.org/core/>
SELECT ?taxon
FROM <http://sparql.uniprot.org/taxonomy/>
WHERE
{
?taxon a up:Taxon .
}
"
qd <- SPARQL(endpoint,query)
df <- qd$results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment