Skip to content

Commit

Permalink
Add badge for preferred citations (#2070)
Browse files Browse the repository at this point in the history
* Add badge for preferred citations

This PR adds a "preferred" citation field as suggested in #2063 (comment) and adds a nice display badge to match it so we can remove more redundant information from ECO and FBbt.

This PR also removes some redundant information from ECO and FBbt.

* Revert ECO change

* Add test for only one preferred citation

Co-authored-by: Nico Matentzoglu <[email protected]>
  • Loading branch information
cthoyt and matentzn authored Aug 30, 2022
1 parent 4917045 commit 10dd17d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions _layouts/ontology_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ <h3 class="panel-title">Publications</h3>
{% for p in page.publications %}
<div class="list-group-item">
<a href="{{p.id}}">{{p.title}}</a>
{% if p.preferred %}
<span class="badge">Preferred</span>
{% endif %}
</div>
{% endfor %}
</div>
Expand Down
3 changes: 1 addition & 2 deletions ontology/eco.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ products:
publications:
- id: https://www.ncbi.nlm.nih.gov/pubmed/30407590
title: 'ECO, the Evidence & Conclusion Ontology: community standard for evidence information.'
preferred: true
- id: https://www.ncbi.nlm.nih.gov/pubmed/25052702
title: Standardized description of scientific evidence using the Evidence Ontology (ECO)
repository: https://github.com/evidenceontology/evidenceontology
Expand Down Expand Up @@ -65,6 +66,4 @@ For **advice on requesting new terms**, please see **[the Evidence & Conclusion

For **further information** visit the **[Evidence & Conclusion Ontology website](http://www.evidenceontology.org/)**.

Please **cite** the following paper: [Giglio M, Tauber R, Nadendla S, Munro J, Olley D, Ball S, Mitraka E, Schriml LM, Gaudet P, Hobbs ET, Erill I, Siegele DA, Hu JC, Mungall C, Chibucos MC. **ECO, the Evidence & Conclusion Ontology: community standard for evidence information**. Nucleic Acids Res. 2019 Jan 8;47(D1):D1186-D1194.](https://www.ncbi.nlm.nih.gov/pubmed/30407590)

This work is made possible by **[award number 1458400](http://www.nsf.gov/awardsearch/showAward?AWD_ID=1458400)** from the **US National Science Foundation's Division of Biological Infrastructure**.
6 changes: 1 addition & 5 deletions ontology/fbbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ products:
publications:
- id: https://www.ncbi.nlm.nih.gov/pubmed/24139062
title: The Drosophila anatomy ontology
preferred: true
- id: https://www.ncbi.nlm.nih.gov/pubmed/22402613
title: A strategy for building neuroanatomy ontologies
- id: https://www.ncbi.nlm.nih.gov/pubmed/22180411
Expand Down Expand Up @@ -65,8 +66,3 @@ usages:
user: http://flybase.org
activity_status: active
---

An ontology representing the gross anatomy of Drosophila melanogaster.

FBbt can be cited as:
_Costa M., Reeve S., Grumbling G., Osumi-Sutherland D._ (2013) The Drosophila anatomy ontology. [Journal of Biomedical Semantics __4__(32).](https://doi.org/10.1186/2041-1480-4-32)
9 changes: 9 additions & 0 deletions tests/test_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def test_dependencies(self):
def test_publications(self):
"""Test publications information."""
for ontology, data in sorted(self.ontologies.items()):
self.assertIn(
sum(
publication.get("preferred", False)
for publication in data.get("publications", [])
),
{0, 1},
msg=f"Only one publication can be marked as preferred for {ontology}.",
)

for i, publication in enumerate(data.get("publications", [])):
identifier = publication["id"]
if ontology == "agro" and identifier.startswith("http://ceur-ws.org/"):
Expand Down
3 changes: 3 additions & 0 deletions util/schema/registry_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@
},
"title": {
"type": "string"
},
"preferred": {
"type": "boolean"
}
},
"required": [
Expand Down

0 comments on commit 10dd17d

Please sign in to comment.