Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protein.py #1174

Merged
merged 2 commits into from Oct 17, 2022
Merged

Update protein.py #1174

merged 2 commits into from Oct 17, 2022

Conversation

giammi56
Copy link
Contributor

GzipFile reads files as objects ('rb' mode, text not implemented), therefore the .split() contains a "b" character in front. The solution proposed is decoding the byte into strings.

GzipFile reads files as objects ('rb' mode, text not implemented), therefore the .split() contains a "b" character in front.
The solution proposed is decoding the byte into strings.
@@ -73,17 +73,17 @@
last_chain_label = None
for line in infile:
line = line.split()
Copy link

@JAGulin JAGulin Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This old example fails for me too, but I'd rather suggest converting the line in one go and drop the other changes. E.g.

line = line.decode("utf-8").split()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree, this is much easier and works.

Copy link

@JAGulin JAGulin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When updating anyway, the download URL should be changed to

https://files.rcsb.org/pub/pdb/data/structures/divided/pdb/q0/pdb%s.ent.gz

according to the documentation on

https://www.wwpdb.org/ftp/pdb-ftp-sites

Copy link
Member

@prabhuramachandran prabhuramachandran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I agree with @JAGulin that the one-line fix is much easier.

@@ -73,17 +73,17 @@
last_chain_label = None
for line in infile:
line = line.split()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree, this is much easier and works.

Change the URL and also make the required changes.
@prabhuramachandran
Copy link
Member

I have made the necessary changes myself. Will fire the builds now.

@prabhuramachandran prabhuramachandran merged commit c0c8533 into enthought:master Oct 17, 2022
@giammi56 giammi56 deleted the patch-1 branch October 31, 2022 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants