These queries list the latest 10 articles about a number of topics. It is no replacement for Scholia [1], which has a much richer overview of literature on the topic. Each section includes a link to the Scholia page for that topic. The queries used here are very basic, and only use the ‘main subject’ property. This tutorial explains how to annotation literature with main subjects in Wikidata.
SARS-CoV-2 is the name of the virus.
SPARQL sparql/litSARSCoV2.rq (run, edit)
SELECT (MAX(?dates) as ?date) ?work ?workLabel ?doi WHERE {
?work wdt:P921 wd:Q82069695 .
OPTIONAL { ?work wdt:P577 ?dates . }
OPTIONAL { ?work wdt:P356 ?doi . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?work ?workLabel ?doi ORDER BY DESC(?date) ?work
This gives these 10 papers:
Specific virus variants are getting particular interest, and we can find the articles about those variants too:
SPARQL sparql/litSARSCoV2Variants.rq (run, edit)
#defaultView:BarChart
SELECT ?variant ?variantLabel (COUNT(?work) AS ?count) WHERE {
?variant wdt:P31 wd:Q104450895 .
?work wdt:P921 ?variant .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?variant ?variantLabel
ORDER BY ASC(?variantLabel)
This gives:
We can also query for articles about the genes. It breaks down like this:
We get that bar chart with this query:
SPARQL sparql/articleCountPerGene.rq (run, edit)
#defaultView:BarChart
SELECT ?gene ?geneLabel (COUNT(?work) AS ?count) WHERE {
?gene wdt:P703 wd:Q82069695 ; wdt:P31 wd:Q7187 .
?work wdt:P921 ?gene .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?gene ?geneLabel
ORDER BY ASC(?geneLabel)
The articles themselves we can list with this query:
SPARQL sparql/litSARSCoV2Genes.rq (run, edit)
SELECT (MAX(?dates) as ?date) ?work ?workLabel ?doi WHERE {
?gene wdt:P703 wd:Q82069695 ; wdt:P31 wd:Q7187 .
?work wdt:P921 ?gene .
OPTIONAL { ?work wdt:P577 ?dates . }
OPTIONAL { ?work wdt:P356 ?doi . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?work ?workLabel ?doi ORDER BY DESC(?date)
Which currently returns:
And about the virus proteins we have this distribution of articles:
We get that bar chart with this query:
SPARQL sparql/articleCountPerProtein.rq (run, edit)
#defaultView:BarChart
SELECT ?protein ?proteinLabel (COUNT(?work) AS ?count) WHERE {
?protein wdt:P703 wd:Q82069695 ; wdt:P31 wd:Q8054 .
?work wdt:P921 ?protein .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?protein ?proteinLabel
ORDER BY ASC(?proteinLabel)
The articles themselves we can list with this query:
SPARQL sparql/litSARSCoV2Proteins.rq (run, edit)
SELECT (MAX(?dates) as ?date) ?work ?workLabel ?doi WHERE {
?protein wdt:P703 wd:Q82069695 ; wdt:P31 wd:Q8054 .
?work wdt:P921 ?protein .
OPTIONAL { ?work wdt:P577 ?dates . }
OPTIONAL { ?work wdt:P356 ?doi . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?work ?workLabel ?doi ORDER BY DESC(?date)
Which currently returns:
As outlined in Chapter 2, SARS-Cov-2 is one of the coronaviruses that can infect humans.
SPARQL sparql/litCoronaviruses.rq (run, edit)
SELECT (MAX(?dates) as ?date) ?work ?workLabel ?doi WHERE {
?work wdt:P921 wd:Q57751738 .
OPTIONAL { ?work wdt:P577 ?dates . }
OPTIONAL { ?work wdt:P356 ?doi . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
} GROUP BY ?work ?workLabel ?doi ORDER BY DESC(?date)
This gives these 10 papers:
The seven human coronaviruses have more than 6000 thousand articles about
them in Wikidata. The following query therefore is a bit tuned for performance
and more complex. Also, the list is quite long, and not given on this page.
To see the output, click below in the name of the litHumanCoronaviruses.rq
file:
SPARQL sparql/litHumanCoronaviruses.rq (run, edit)
SELECT ?date ?work ?workLabel ?virus ?virusLabel ?doi ?pubmed WITH {
SELECT (MAX(?dates) as ?date) ?work ?doi ?virus WHERE {
VALUES ?virus {
wd:Q82069695 # SARS-CoV-2
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q8351095 # NL63
wd:Q16983356 # 229E
wd:Q4902157 # MERS-CoV
wd:Q278567 # SARS-CoV
}
?work wdt:P577 ?dates ;
wdt:P921 ?virus .
} GROUP BY ?work ?doi ?virus
ORDER BY DESC(?date)
LIMIT 5000
} AS %ARTICLES WHERE {
INCLUDE %ARTICLES
OPTIONAL { ?work wdt:P356 ?doi . }
OPTIONAL { ?work wdt:P698 ?pubmed . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?date) ?doi ?pubmed ?virus
Moreover, the number of articles for each virus varies significantly, which can be visualized with this query:
SPARQL sparql/litHumanCoronavirusesCounts.rq (run, edit)
SELECT ?virus ?virusLabel ?count WITH {
SELECT ?virus (COUNT(DISTINCT ?work) AS ?count) WHERE {
VALUES ?virus {
wd:Q82069695 # SARS-CoV-2
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q8351095 # NL63
wd:Q16983356 # 229E
wd:Q4902157 # MERS-CoV
wd:Q278567 # SARS-CoV
}
?work wdt:P921 ?virus .
} GROUP BY ?virus
} AS %ARTICLES WHERE {
INCLUDE %ARTICLES
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count)
Which tells us:
virus | count |
SARS-CoV-2 (edit) | 24131 |
SARSr-CoV (edit) | 2487 |
Middle East respiratory syndrome coronavirus (edit) | 1051 |
Human coronavirus OC43 (edit) | 114 |
Human coronavirus 229E (edit) | 107 |
human Coronavirus NL63 (edit) | 94 |
Human coronavirus HKU1 (edit) | 22 |
SPARQL sparql/litHumanCoronavirusesGeneCounts.rq (run, edit)
SELECT ?virus ?virusLabel ?gene ?geneLabel ?count WITH {
SELECT ?virus ?gene (COUNT(DISTINCT ?work) AS ?count) WHERE {
VALUES ?virus {
wd:Q82069695 # SARS-CoV-2
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q8351095 # NL63
wd:Q16983356 # 229E
wd:Q4902157 # MERS-CoV
wd:Q278567 # SARS-CoV
}
?gene wdt:P703 ?virus ; wdt:P31 wd:Q7187 .
?work wdt:P921 ?gene .
} GROUP BY ?virus ?gene
} AS %ARTICLES WHERE {
INCLUDE %ARTICLES
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count)
Which shows us:
SPARQL sparql/litHumanCoronavirusesProteinCounts.rq (run, edit)
SELECT ?virus ?virusLabel ?protein ?proteinLabel ?count WITH {
SELECT ?virus ?protein (COUNT(DISTINCT ?work) AS ?count) WHERE {
VALUES ?virus {
wd:Q82069695 # SARS-CoV-2
wd:Q16983360 # HKU1
wd:Q16991954 # OC43
wd:Q8351095 # NL63
wd:Q16983356 # 229E
wd:Q4902157 # MERS-CoV
wd:Q278567 # SARS-CoV
}
?protein wdt:P31 wd:Q8054 .
{ ?protein wdt:P703 ?virus }
UNION
{ ?protein wdt:P702 | ^wdt:P688 ?gene . ?gene wdt:P703 ?virus }
?work wdt:P921 ?protein .
} GROUP BY ?virus ?protein
} AS %ARTICLES WHERE {
INCLUDE %ARTICLES
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en". }
}
ORDER BY DESC(?count) ?virus ?protein
Where the counts are: