Expected Behavior
foldseek structureto3didescriptor reads a PDB file, extract the protein sequence, then output corresponding 3Di sequence.
Current Behavior
foldseek structureto3didescriptor output a slightly incorrect result when it reads PDB file containing residues with alternative conformation/location or ligands that are amino acids. To be clear,
incorrect output sequence -> unnecessary additional/alternative residues in protein sequences and 3Di sequences.
Steps to Reproduce
foldseek structureto3didescriptor 3JQH.cif.gz 3JQH_output.tsv
or PDB 1EJG etc.
Foldssek Output (for bugs)
- True protein sequence: PEKSKLQEIYQELTRLKAAVGEL (length 23)
- current foldseek output protein sequene: PSEKSKLQEIYQELTRQELKAAVGEL (length 23+3=26)
- current foldseek output 3Di sequene: DDDPVVVVVVVVVVCLVVVVVVVVVD (length 26)
Context
Quick fix: use gemmi's first_conformer function to remove alternative residue conformation:
|
// Iterators that in case of multiple conformations (alt. locations) |
|
// skip all but the first conformation. |
|
UniqProxy<Atom> first_conformer() { return {atoms}; } |
|
ConstUniqProxy<Atom> first_conformer() const { return {atoms}; } |
|
}; |
As well as gemmi's get_polymer function to remove ligands:
|
ResidueSpan get_polymer() { |
|
auto begin = residues.begin(); |
|
while (begin != residues.end() && begin->entity_type != EntityType::Polymer) |
|
++begin; |
|
auto end = begin; |
|
while (end != residues.end() && end->entity_type == EntityType::Polymer |
|
&& end->subchain == begin->subchain) |
|
++end; |
|
return ResidueSpan(residues, &*begin, end - begin); |
|
} |
|
ConstResidueSpan get_polymer() const { |
|
return const_cast<Chain*>(this)->get_polymer(); |
|
} |
Your Environment
foldseek Version: 8.ef4e960
Expected Behavior
foldseek structureto3didescriptorreads a PDB file, extract the protein sequence, then output corresponding 3Di sequence.Current Behavior
foldseek structureto3didescriptoroutput a slightly incorrect result when it reads PDB file containing residues with alternative conformation/location or ligands that are amino acids. To be clear,incorrect output sequence -> unnecessary additional/alternative residues in protein sequences and 3Di sequences.
Steps to Reproduce
or PDB 1EJG etc.
Foldssek Output (for bugs)
Context
Quick fix: use gemmi's
first_conformerfunction to remove alternative residue conformation:foldseek/lib/gemmi/model.hpp
Lines 273 to 277 in 1f13fa7
As well as gemmi's
get_polymerfunction to remove ligands:foldseek/lib/gemmi/model.hpp
Lines 486 to 498 in 920bbf2
Your Environment
foldseek Version: 8.ef4e960