haddocking / pdb-tools

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

Added new tool pdb_uniq #20

Closed JoaoRodrigues closed 4 years ago

JoaoRodrigues commented 5 years ago

Addresses issue #12. I opted by creating a new tool instead of changing pdb_wc. It lists unique residue names and chain identifiers, which I consider to be the most commonly sought things? It keeps the order in which things were found (instead of alphabetical or so).

codecov[bot] commented 5 years ago

Codecov Report

Merging #20 into master will decrease coverage by 0.27%. The diff coverage is 69.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   81.79%   81.51%   -0.28%     
==========================================
  Files          43       44       +1     
  Lines        3471     3549      +78     
  Branches      730      747      +17     
==========================================
+ Hits         2839     2893      +54     
- Misses        447      464      +17     
- Partials      185      192       +7
Impacted Files Coverage Δ
pdbtools/pdb_uniq.py 69.23% <69.23%> (ø)

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...a8c0130. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #20 into master will decrease coverage by 0.14%. The diff coverage is 71.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   81.79%   81.64%   -0.15%     
==========================================
  Files          43       45       +2     
  Lines        3471     3612     +141     
  Branches      730      766      +36     
==========================================
+ Hits         2839     2949     +110     
- Misses        447      468      +21     
- Partials      185      195      +10
Impacted Files Coverage Δ
pdbtools/pdb_uniq.py 71.59% <71.59%> (ø)
pdbtools/pdb_selhetatm.py 88.67% <0%> (ø)

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...8f6dc18. Read the comment docs.

JoaoRodrigues commented 5 years ago

I thought of that but you can always do pdb_selhetatm file.pdb | pdb_uniq. Would it work?

amjjbonvin commented 5 years ago

I guess it would do the job, but personally I don't see when I would use such a pdb_uniq tool. Having first to select the HETATM and then use pdb_uniq seems cumbersome. I would rather like to know what is in a file without having to first select parts.

pdb_wc already tells you the number of chains and if there is an HETATM or not. Knowing the chainIDs and the ligand resname is all I would be interested in. Which amino acids are presents seems rather irrelevant.

But that's only my view of it of course

mtrellet commented 5 years ago

Could not we have a third option/line output with heteroatoms? Putting everything under "Residues" could be slightly misleading and the distinction would greatly improve the readability in my opinion.

JoaoRodrigues commented 5 years ago

I see that's a wanted feature :) I'll change it!

JoaoRodrigues commented 5 years ago

Added a -h flag to show HETATM residue names.

JoaoRodrigues commented 4 years ago

Superseeded by #51