First find out the IRI for "single-pass type IV membrane protein" in the subcellular location vocabulary used in uniprot.
In this case "http://purl.uniprot.org/locations/9908".
As it subcellular location annotations are structured we need to find the exact placing in the topology.
?subcellularLocationAnnotation up:locatedIn ?locatedIn .
?locatedIn up:topology location:9908 .
Then you need to find the evidence for it. In UniProt RDF we have decided to add evidences using rdf reification and attributions.
[] rdf:subject ?locatedIn ;
rdf:predicate up:topology ;
rdf:object location:9908 ;
up:attribution ?attribution .
?attribution up:evidence <http://purl.obolibrary.org/obo/ECO_0000305>
Taking this together we end up with the full query
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns
PREFIX location:<http://purl.uniprot.org/locations/>
SELECT
*
WHERE {
?entry up:annotation/up:locatedIn ?locatedIn .
?locatedIn up:topology location:9908 .
[] rdf:subject ?locatedIn ;
rdf:predicate up:topology ;
rdf:object location:9908 ;
up:attribution/up:evidence <http://purl.obolibrary.org/obo/ECO_0000305>.
}
While in this case location:9908 does not have more specific child terms it is useful to expand the query for those cases.
e.g. if you where looking for "Single-pass membrane protein"
{
BIND(location:9904 as ?location)
} UNION {
?location rdfs:subClassOf location:9904 .
}
?locatedIn up:topology ?location.