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

read_pdb_from_list() not containing newlines #130

Open
uros-sipetic opened this issue Jun 29, 2023 · 0 comments
Open

read_pdb_from_list() not containing newlines #130

uros-sipetic opened this issue Jun 29, 2023 · 0 comments

Comments

@uros-sipetic
Copy link

uros-sipetic commented Jun 29, 2023

Describe the bug

When reading in PDB content via read_pdb_from_list(), the text itself does not contain newlines where they should be, thus making any future commands like
pdb_lines = ppdb.pdb_text.split("\n")
not work properly (as after splitting, a list with just 1 huge element is returned, the element being the entire PDB content

Steps/Code to Reproduce

ppdb = PandasPdb().read_pdb(input_pdb)
pdb_lines = ppdb.pdb_text.split("\n")
new_ppdb = PandasPdb().read_pdb_from_list(pdb_lines)
new_pdb_lines = new_ppdb.pdb_text.split("\n")

Expected Results

I would expect the last line in the above code to create a list of all the lines in the PDB file.

Actual Results

The output of the last line in the above code is a list with just 1 element, the element being the entire PDB content as one string

Versions

biopandas 0.4.1
macOS-13.2.1-x86_64-i386-64bit
Python 3.9.16 (main, Dec 7 2022, 10:16:11)
[Clang 14.0.0 (clang-1400.0.29.202)]
Scikit-learn 1.0.1
NumPy 1.22.4
SciPy 1.7.1

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

No branches or pull requests

1 participant