BioPandas / BioPandas/biopandas
Unable to export PDB DFs with model_id columns
- Dominant language
- Python
- Stars
- 756
- Forks
- 119
- Avg merge
- 23h 8m
- Merged PRs (30d)
- 2
Description
Currently, PDB export breaks when model_id columns are added to the dataframe. This should be an easy fix by copying the dataframe and dropping any extraneous (i.e. non standard PDB colums) prior to parsing the output from the dataframe.
> I also added a workaround that's needed when exporting (i.e., calling `to_pdb()` on) PandasPdb objects that have had a `model_id` column added to them. In the long term, I think it'd be good to have a fix merged into the `master` branch of `BioPandas` that types the `model_id` column as a `str` -> `object` column, but this workaround I've proposed should work for now.
_Originally posted by @amorehead in https://github.com/a-r-j/graphein/issues/309#issuecomment-1513710494_
Contributor guide
Research direction
Start at the PandasPdb.to_pdb() entry point and reproduce the export with a dataframe containing a model_id column. Inspect how dataframe columns are parsed, then verify that exporting a PandasPdb object with model_id succeeds while extraneous columns are excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- bioinformatics, data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100