haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
385 stars 113 forks source link

Added tool to select HETATM records. #21

Closed JoaoRodrigues closed 5 years ago

JoaoRodrigues commented 5 years ago

Suggested by @cgott98 in issue #19. Extracts HETATM records from the file.

codecov[bot] commented 5 years ago

Codecov Report

Merging #21 into master will increase coverage by 0.1%. The diff coverage is 88.67%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #21     +/-   ##
=========================================
+ Coverage   81.79%   81.89%   +0.1%     
=========================================
  Files          43       44      +1     
  Lines        3471     3524     +53     
  Branches      730      742     +12     
=========================================
+ Hits         2839     2886     +47     
- Misses        447      451      +4     
- Partials      185      187      +2
Impacted Files Coverage Δ
pdbtools/pdb_selhetatm.py 88.67% <88.67%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba5bfdd...72f1249. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #21 into master will increase coverage by 0.1%. The diff coverage is 88.67%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #21     +/-   ##
=========================================
+ Coverage   81.79%   81.89%   +0.1%     
=========================================
  Files          43       44      +1     
  Lines        3471     3524     +53     
  Branches      730      742     +12     
=========================================
+ Hits         2839     2886     +47     
- Misses        447      451      +4     
- Partials      185      187      +2
Impacted Files Coverage Δ
pdbtools/pdb_selhetatm.py 88.67% <88.67%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba5bfdd...72f1249. Read the comment docs.

JoaoRodrigues commented 5 years ago

I would leave that to pdb_tidy. I find it easier like this, specially if you want to merge/split later on. What do you think?

amjjbonvin commented 5 years ago

Fine as long as all selection tools have the same behaviour, which doesn't seem to be the case. E.g. pdb_selchain does keep the TER and END statements.

JoaoRodrigues commented 5 years ago

Will have a look and standardize the behavior!

JoaoRodrigues commented 5 years ago

Had a look. The reason why pdb_selchain keeps TER statements is because there is actually some chain information in there. For instance, pdb_selseg cannot pick TER statements reliably (they don't have a segment id) so it skips them. For HETATM, this is very inconsistent because some ligands are at the end of the PDB file while others (e.g. MSE) are mixed with the regular sequence. Getting proper TER records from this would be a mess... so I vote to leave it as is and rely on pdb_tidy to then add the proper statements.

amjjbonvin commented 5 years ago

Ok - fine on my side. By the way, another useful feature/tool would be to replace MSE simply by MET and change to ATOM instead of HETATM. Leaving it as HETATM and applying pdb_tidy will had every time TER statements around it, causing some software not to create peptidic bonds for those.

JoaoRodrigues commented 5 years ago

I'll make a new issue for that one. I have an idea on how to work that out, but it'd include removing atoms that are not in the standard residue.