diff --git a/catalog/context_processors.py b/catalog/context_processors.py index 84fa8687..7c197e65 100644 --- a/catalog/context_processors.py +++ b/catalog/context_processors.py @@ -46,8 +46,8 @@ def pgs_search_examples(request): def pgs_info(request): return { - 'pgs_citation': constants.PGS_CITATION[0], - 'pgs_citations': constants.PGS_CITATION, + 'pgs_citation': constants.PGS_CITATIONS[0], + 'pgs_citations': constants.PGS_CITATIONS, 'pgs_publications': constants.PGS_PUBLICATIONS, 'pgs_table_helper': constants.TABLE_HELPER, 'ensembl_version': constants.ENSEMBL_VERSION diff --git a/catalog/tests/test_models.py b/catalog/tests/test_models.py index 3ef8d374..dd5e4692 100644 --- a/catalog/tests/test_models.py +++ b/catalog/tests/test_models.py @@ -1155,7 +1155,7 @@ def create_retired(self, data_id, pub_doi, retirement_notes): def test_retired_score(self): score_id = 'PGS000999' - score_doi = constants.PGS_CITATION['doi'] + score_doi = constants.PGS_CITATIONS[0]['doi'] score_notes = 'This score has been retired' retired_score = self.create_retired(score_id, score_doi, score_notes) # Instance diff --git a/pgs_web/constants.py b/pgs_web/constants.py index ee34cc4e..372911c5 100644 --- a/pgs_web/constants.py +++ b/pgs_web/constants.py @@ -1,6 +1,6 @@ # Module storing constants used across the website -PGS_CITATION = [ +PGS_CITATIONS = [ { 'title': 'Enhancing the Polygenic Score Catalog with tools for score calculation and ancestry normalization', 'doi': '10.1038/s41588-024-01937-x', @@ -21,12 +21,12 @@ PGS_PUBLICATIONS = [ { - 'title': PGS_CITATION[0]['title'], + 'title': PGS_CITATIONS[0]['title'], 'authors': 'Lambert, Wingfield et al', - 'year': PGS_CITATION[0]['year'], - 'doi': PGS_CITATION[0]['doi'], - 'PMID': PGS_CITATION[0]['PMID'], - 'journal': PGS_CITATION[0]['journal'] + 'year': PGS_CITATIONS[0]['year'], + 'doi': PGS_CITATIONS[0]['doi'], + 'PMID': PGS_CITATIONS[0]['PMID'], + 'journal': PGS_CITATIONS[0]['journal'] }, { 'title': 'The NHGRI-EBI GWAS Catalog: knowledgebase and deposition resource', @@ -37,12 +37,12 @@ 'journal': 'Nucleic Acids Research 51(D1):D977-D985' }, { - 'title': PGS_CITATION[1]['title'], + 'title': PGS_CITATIONS[1]['title'], 'authors': 'Lambert et al', - 'year': PGS_CITATION[1]['year'], - 'doi': PGS_CITATION[1]['doi'], - 'PMID': PGS_CITATION[1]['PMID'], - 'journal': PGS_CITATION[1]['journal'] + 'year': PGS_CITATIONS[1]['year'], + 'doi': PGS_CITATIONS[1]['doi'], + 'PMID': PGS_CITATIONS[1]['PMID'], + 'journal': PGS_CITATIONS[1]['journal'] } ] @@ -65,7 +65,7 @@ 'TERMS_OF_USE' : 'https://www.ebi.ac.uk/about/terms-of-use', 'TEMPLATEGoogleDoc_URL' : 'https://docs.google.com/spreadsheets/d/1UEGH0NNuQ8ifbsxIhe8HbnG9XYjsIwSF/edit?usp=sharing', 'CurationGoogleDoc_URL' : 'https://drive.google.com/file/d/1QYdKBnEqAmhSZIuMux7ifpT3ZBk9gupT/view', - 'CATALOG_PUBLICATION_URL' : 'https://doi.org/'+PGS_CITATION[0]['doi'], + 'CATALOG_PUBLICATION_URL' : 'https://doi.org/' + PGS_CITATIONS[0]['doi'], 'EPMC_REST_SEARCH' : 'https://www.ebi.ac.uk/europepmc/webservices/rest/search' } diff --git a/release/scripts/EuropePMCLinkage.py b/release/scripts/EuropePMCLinkage.py index aae65cc0..af22ff5a 100644 --- a/release/scripts/EuropePMCLinkage.py +++ b/release/scripts/EuropePMCLinkage.py @@ -47,7 +47,7 @@ def generate_xml_file(self): title = 'Link to the Polygenic Score (PGS) Catalog resource' url = self.pgs_url source = 'MED' - pmid = constants.PGS_CITATION['PMID'] + pmid = constants.PGS_CITATIONS[0]['PMID'] self.create_xml_link(title,url,source,pmid) # Add PGS Publications diff --git a/rest_api/views.py b/rest_api/views.py index f5342c99..943ef83f 100644 --- a/rest_api/views.py +++ b/rest_api/views.py @@ -687,7 +687,7 @@ def get(self, request): data = { 'rest_api': constants_rest.PGS_REST_API[0], 'latest_release': latest_release, - 'citation': constants.PGS_CITATION[0], + 'citation': constants.PGS_CITATIONS[0], 'pgs_catalog_publications': constants.PGS_PUBLICATIONS, 'ensembl_version': constants.ENSEMBL_VERSION, 'terms_of_use': constants.USEFUL_URLS['TERMS_OF_USE']