Ejemplos de código: curl
SELECT ?virus ?virusLabel ?protein ?proteinLabel ?refseq ?uniprot WHERE {
VALUES ?virus {
wd:Q16000326 # SL-CoV-WIV1
wd:Q88162038 # Bat SARS coronavirus Rp1
wd:Q85939995 # SHC014-CoV
wd:Q82069695 # SARS-CoV-2
wd:Q34967815 # SARS coronavirus
wd:Q85438966 # severe acute respiratory syndrome coronavirus
wd:Q278567 # SARSr-CoV / SARS-CoV
}
?protein wdt:P703 ?virus ; wdt:P31 wd:Q8054 .
OPTIONAL { ?protein wdt:P637 ?refseq }
OPTIONAL { ?protein wdt:P352 ?uniprot }
SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }
} ORDER BY ASC(?virus) ASC(?protein)
curl -s https://raw.githubusercontent.com/egonw/SARS-CoV-2-Queries/master/sparql/virusProteinsSARSr.rq | sed 's+<lang/>+es+' > virusProteinsSARSr.rq
curl -H "Accept: text/tab-separated-values" -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query@virusProteinsSARSr.rq
Esta consulta SPARQL está disponible en CCZero.