User:Egonw/PFAS

From Chemical Compounds of Interest
Jump to navigation Jump to search

Adding PFAS

Using this query to get PFAS from Wikidata:

SELECT ?smiles (SUBSTR(STR(?pfas),32) AS ?qid) ?pfasLabel  WHERE {
  { ?pfas wdt:P31 wd:Q648037 }
  UNION
  { ?pfas wdt:P279+ wd:Q648037 }
  OPTIONAL { ?pfas wdt:P233 ?canSMI }
  OPTIONAL { ?pfas wdt:P2017 ?isoSMI }
  BIND (COALESCE(?isoSMI, ?canSMI) AS ?smiles)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Save the output as TSV file, e.g. pfas.tsv.

This is processed with:

groovy createWDitemsFromSMILES.groovy -w compoundcloud.wikibase.cloud -s -c Q216 -d P5 -l -i wikidata -a P11 -f pfas.tsv