johnnytam100 / pdb2uniprot Goto Github PK
View Code? Open in Web Editor NEWA Python script to map PDB ID + chain ID to UniProt ID.
A Python script to map PDB ID + chain ID to UniProt ID.
hi
thank you for great code for assigning the PDB id with Uniprot id.
however, I want to tell you something to change.
In chain id, there are some lower chain in PDB.
So I want to advice to change the code from 'chain.upper()' to 'chain' below.
It will be more accurately operate for other cases. :)
Hi,
I have to replace with input.endswith('.cvs') since otherwise I get:
python ~/src/pdb2uniprot/pdb2uniprot_tam.py --input pdb2uniprot.cvs --pdb_col PDB_ID --chain_col CHAIN_ID
/home/myuser//src/pdb2uniprot/pdb2uniprot_tam.py:16: DeprecationWarning:
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
import pandas as pd
pdb2uniprot.cvs
Traceback (most recent call last):
File "/home/myuser//src/pdb2uniprot/pdb2uniprot_tam.py", line 50, in <module>
pdb_chain_df.columns = ['pdb','chain']
^^^^^^^^^^^^^^^^^^^^
File "/home/myuser/bio/lib/python3.11/site-packages/pandas/core/generic.py", line 6307, in __setattr__
return object.__setattr__(self, name, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "properties.pyx", line 69, in pandas._libs.properties.AxisProperty.__set__
File "/home/myuser/bio/lib/python3.11/site-packages/pandas/core/generic.py", line 813, in _set_axis
self._mgr.set_axis(axis, labels)
File "/home/myuser/bio/lib/python3.11/site-packages/pandas/core/internals/managers.py", line 239, in set_axis
self._validate_set_axis(axis, new_labels)
File "/home/myuser/bio/lib/python3.11/site-packages/pandas/core/internals/base.py", line 98, in _validate_set_axis
raise ValueError(
ValueError: Length mismatch: Expected axis has 1 elements, new values have 2 elements
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.