biopandas
biopandas copied to clipboard
read_pdb_from_list() not containing newlines
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