PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX chembl: <http://rdf.farmbio.uu.se/chembl/onto/#>
PREFIX blueobelisk: <http://www.blueobelisk.org/chemistryblogs/>
SELECT DISTINCT ?type ?target ?pubmed ?l4 ?l5 ?l6 ?mol ?SMILES ?val ?seq
WHERE {
 ?act chembl:type ?type;
      chembl:onAssay ?ass;
      chembl:forMolecule ?mol;
      chembl:standardValue ?val.
 ?ass chembl:hasTarget ?target;
          chembl:extractedFrom ?journal.
?ass chembl:hasTargetCount 1 .
?journal <http://purl.org/ontology/bibo/pmid> ?pubmed.
 ?mol blueobelisk:smiles ?SMILES.
 ?target a <http://rdf.farmbio.uu.se/chembl/onto/#Target> ;
           chembl:classL3 "VGC" ;
           chembl:classL4 ?l4 ;
           chembl:classL5 ?l5 ;
           chembl:classL6 ?l6 ;
           chembl:sequence ?seq.
FILTER regex(?l6, "NA")
FILTER (?type = "Ki" || ?type = "IC50")
}