Skip to content

Commit

Permalink
Merge pull request #1651 from jamesmkrieger/fetchpdb_fix
Browse files Browse the repository at this point in the history
only split twice in fetchPDB if ending is gz
  • Loading branch information
jamesmkrieger authored Feb 2, 2023
2 parents fba01a9 + ec9b431 commit 89d522c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prody/proteins/localpdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,10 @@ def findPDBFiles(path, case=None, **kwargs):
pdbs = {}
for fn in iterPDBFilenames(path, sort=True, reverse=True, **kwargs):
fn = normpath(fn)
pdb = splitext(splitext(split(fn)[1])[0])[0]
pdb = splitext(split(fn)[1])[0]
ending = splitext(splitext(split(fn)[1])[0])[1]
if ending == 'gz':
pdb = splittext(pdb)[0]
if len(pdb) == 7 and pdb.startswith('pdb'):
pdb = pdb[3:]
if upper:
Expand Down

0 comments on commit 89d522c

Please sign in to comment.