Skip to content

Commit

Permalink
Update article_is_retracted
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Dec 18, 2023
1 parent 73807e8 commit 5e57312
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions indra/literature/pubmed_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def article_is_retracted(pmid: str) -> bool:
Parameters
----------
pmid :
The PMID of the paper to check as an integer.
The PMID of the paper to check as a string.
Returns
-------
Expand All @@ -982,8 +982,8 @@ def article_is_retracted(pmid: str) -> bool:
"""
global retractions
if retractions is None:
with gzip.open(RETRACTIONS_FILE, 'rt') as fh:
retractions = {row[0] for row in csv.reader(fh, delimiter='\t')}
with open(RETRACTIONS_FILE, 'r') as fh:
retractions = {row[0] for row in fh.read().splitlines()}
return pmid in retractions


Expand Down

0 comments on commit 5e57312

Please sign in to comment.