Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get all mouse pathways. This perl scripts returns the uri through identifiers.org, a link the rdf version of the pathway and a url for the wiki entry of the specific revision currently loading in the triple store of wikipathways
#!/usr/bin/perl
use LWP::Simple;
use URI::Escape;
my $sparql = "SELECT DISTINCT ?wpIdentifier ?pathway ?page
WHERE {
?pathway dc:title ?title .
?pathway wp:organism ?organism .
?pathway foaf:page ?page .
?pathway dc:identifier ?wpIdentifier .
?organism rdfs:label \"Mus musculus\"^^<http://www.w3.org/2001/XMLSchema#string> .
}
ORDER BY ?wpIdentifier ";
my $url = 'http://sparql.wikipathways.org/?default-graph-uri=&query='.uri_escape($sparql).'&format=text%2Fcsv&timeout=0&debug=on';
my $content = get $url;
die "Couldn't get $url" unless defined $content;
print $content;
@egonw

This comment has been minimized.

Copy link

@egonw egonw commented Oct 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.