pegerto / mdakit_sasa

Toolkit to calculate the surface accessible area of a molecular dynamic trajectory
https://mdakit-sasa.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
4 stars 2 forks source link

Size error computing specific protein 1YE0 #16

Open pegerto opened 11 months ago

pegerto commented 11 months ago

Expected behavior

Return the expected SASA per residue.

Actual behavior

File  /mdakit_sasa/analysis/sasaanalysis.py:99, in SASAAnalysis._single_frame(self)
     96 residue_areas = [result.residueAreas()[s][r] for s in sorted(list(result.residueAreas().keys())) for r in sorted(list(result.residueAreas()[s].keys()))]
     98 self.results.total_area[self._frame_index] = result.totalArea()
---> 99 self.results.residue_area[self._frame_index] = [r.total for r in residue_areas]

ValueError: could not broadcast input array from shape (711,) into shape (717,)

To reproduce

import MDAnalysis as mda
from mdakit_sasa.analysis.sasaanalysis import SASAAnalysis

u = mda.Universe('/Users/pegerto.fernandez/Downloads/1ye0.pdb')
analysis = SASAAnalysis(u)
analysis.run()
pegerto commented 11 months ago

1YE0 contains 574 residues, it looks like is a specific PDB anomally.

cat 1ye0.pdb | grep ATOM | grep CA  | grep -v REMARK |wc -l
574

When processing this with MDAnalisys;

>>> len(u.residues)
717

Need to find out more about the specific of the PDB