Skip to content

Commit

Permalink
tweak to RheaParser.py for uniprot TrEMBL gzip during file fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbraisted committed Mar 7, 2024
1 parent 3bd34e6 commit bf26a66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/parse/RheaParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ def getRheaFiles(self):
rhea2UniprotUrl = uniprotToRheaConf.sourceURL
rhea2UniprotRemoteFile = uniprotToRheaConf.sourceFileName

self.download_files(rhea2UniprotUrl, self.relDir + localDir + rhea2UniprotRemoteFile)
self.download_files(rhea2UniprotUrl, self.relDir + localDir + rhea2UniprotRemoteFile)
swissProtLocalFileName = uniprotToRheaConf.extractFileName
# now gunzip
with gzip.open(self.relDir + localDir + rhea2UniprotRemoteFile, 'rb') as f_in:
with open(self.relDir + localDir + swissProtLocalFileName, 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
else:
print("Using cached Rhea Uniprot-to-Rhea file.")

Expand Down

0 comments on commit bf26a66

Please sign in to comment.