In the RDF model of UniProt (for better or worse) evidences are attached using reification.
So the query needs
[] a rdf:Statement ;
rdf:subject ?protein ;
rdf:predicate up:annotation ;
rdf:object ?annotation ;
up:attribution ?attribution .
The ?attribution value will have a up:source
and a up:evidence
triple. The up:evidence will give the ECO code. While the source will give a link to a pubmed or other database record.
So a full query (here limited to P05067) will give an annotation focused table, and give the evidences and sources as applicable to the annotation. This can be downloaded as CSV or JSON for further use.
PREFIX uniprotkb:<http://purl.uniprot.org/uniprot/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX faldo:<http://biohackathon.org/resource/faldo#>
PREFIX up:<http://purl.uniprot.org/core/>
SELECT
?protein
(GROUP_CONCAT(?evidence; separator=',') as ?evidences)
(GROUP_CONCAT(?source; separator =',') as ?sources)
?begin
?end
?text
WHERE
{
BIND(uniprotkb:P05067 as ?protein)
?protein a up:Protein ;
up:annotation ?annotation .
?annotation a up:Transmembrane_Annotation ;
up:range ?range ;
rdfs:comment ?text .
?range faldo:begin/faldo:position ?begin ;
faldo:end/faldo:position ?end .
[] a rdf:Statement ;
rdf:subject ?protein ;
rdf:predicate up:annotation ;
rdf:object ?annotation ;
up:attribution ?attribution .
?attribution up:evidence ?evidence .
OPTIONAL {
?attribution up:source ?source .
}
} GROUP BY ?annotation ?protein ?begin ?end ?text
The basic idea of how provenance is modelled in UniProt rdf is described in this abstract but that predates the use of the evidence ontology.
The uniprot website rest service is not super at getting to the evidences, without needing to look at the whole data record in which ever format you prefer.
As always write help@uniprot.org for the fastest help.
These urls may be useful:
https://www.google.ru/#newwindow=1&q=uniprot+sparql+query+and+topology
See this one and some others as well – a lot of them talks about topology.
SPARQL playground
http://sparql-playground.nextprot.org/
(see http://sparql-playground.nextprot.org/help/doc/about to use it)
and this one
neXtProt simple search system (use tags)
See https://snorql.nextprot.org/help/doc/introduction
These are Python applications:
Bioservice documentation: https://pythonhosted.org/bioservices/_modules/bioservices/uniprot.html
this link is about the same as above: https://github.com/cokelaer/bioservices/blob/master/src/bioservices/uniprot.py
neXtProt != UniProt and only focuses on human. The UniProt endpoint is at http://sparql.uniprot.org