Skip to content

Instantly share code, notes, and snippets.

@nakao
Last active December 19, 2015 02:28
Show Gist options
  • Save nakao/5882712 to your computer and use it in GitHub Desktop.
Save nakao/5882712 to your computer and use it in GitHub Desktop.
List human proteins (protein id, gene label, disease mnemonic, disease id and omim id) which have disease annotation. UniProt SPARQL endpoint http://beta.sparql.uniprot.org/
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bibo:<http://purl.org/ontology/bibo/>
PREFIX dc:<http://purl.org/dc/terms/>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
Select ?protein ?geneLabel ?dMnemonic ?disease ?omim
where
{
?protein a up:Protein ;
up:organism <http://purl.uniprot.org/taxonomy/9606> ; # Human
up:annotation ?diseaseA ;
up:encodedBy ?gene .
?gene skos:prefLabel ?geneLabel .
?diseaseA a up:Disease_Annotation ; # Disease
up:disease ?disease .
?disease up:mnemonic ?dMnemonic; # Disease abbribation
rdfs:seeAlso ?omim. # Link to something
?omim up:database <http://purl.uniprot.org/database/MIM> . # something is in OMIM
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment