Comments (3)
Thanks for pointing this out @karlafej !
I haven't worked with multi-chain proteins in recent projects and completely forgot to include them in the test cases, which should definitely be addressed like you said. I just see that there's another problem in the current implementation since it assumes unique residue numbers, which is a bad assumption for multi-domain cases ... I will fix that :).
About the returned values from the amino3to1 function. I think a dictionary could be a good idea, like you suggested, but I would favor returning a list of string sequences to preserve the order in which the chains appear in the PDB flle.
For example, for 5mtn is would return
['SLEPEPWFFK...', 'SVSSVPTKLE...']
and the chain ideas could be obtained via
pdb.df['ATOM']['chain_id'].unique()
if desired. For instance, one could iterate
for sequence, chain_id in zip(amino3to1_results, pdb.df['ATOM']['chain_id'].unique()):
# do something
Alternatively, amino3to1 could return a list of tuples
[('A', 'SLEPEPWFFK...'), ('B', 'SVSSVPTKLE...')]
Any thoughts?
from biopandas.
I just updated the amino3to1
method (in #22 ) to return a DataFrame containing a column for the chain id. I think that this would be the most universally useful way. Let me know if you have any feedback or suggestions on this.
(I added some usage examples here)
from biopandas.
Thank you!
from biopandas.
Related Issues (20)
- Remove walrus operator for py3.7 support
- Docs tutorials & API reference out of date HOT 1
- Stream support for exporting pdbs HOT 6
- Biopandas PDB output formatting leads to a ton of segments when reading with MDAnalysis: reason and my quick fix HOT 1
- Using SIFTS data for renumbering residues to match the Uniprot sequence resids HOT 1
- [Refactor] Reduce code duplication by using abstract base classes
- 0.5.0dev Release HOT 1
- Unable to export PDB DFs with model_id columns
- SettingWithCopyWarning
- read_pdb_from_list() not containing newlines
- Saving new pdb from dataframe HOT 2
- Fetching PDB and saving it to a PDB file shifts one space element type due to b-factor 3 digits
- read_mol2 fails on normal-looking file HOT 2
- [RFC] Enabling Cython-based PDB parser backend for speed improvements HOT 4
- Stream support for exporting pdbs not working with OTHERS record
- Adding possibility for a collection of structures HOT 1
- PandasPdb.to_pdb() will add one more blank for coordinate larger than 1000 HOT 2
- Implement CIF and mmCIF format support for large biological assemblies HOT 2
- Get Carbon Method in PandasPDB HOT 1
- mmCIF -> PDB conversion method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biopandas.