Discngine / fpocket

fpocket is a very fast open source protein pocket detection algorithm based on Voronoi tessellation. The platform is suited for the scientific community willing to develop new scoring functions and extract pocket descriptors on a large scale level. fpocket is distributed as free open source software. If you are interested in integrating fpocket in an industrial setting and require official support, please contact Discngine (www.discngine.com).
MIT License
288 stars 62 forks source link

Standardize error outputs #124

Closed xvlaurent closed 8 months ago

xvlaurent commented 9 months ago

Exit codes and error message are inconsistant for faulty PDB and cif files. For example, processing an empty PDB file lead to no error (exit code 0) and a message printed in stderr while processing an empty CIF file lead to an error (exit code -11) and a no message in stderr.

Would it be possible to standardize errors exit codes and associate stderr messages?

pschmidtke commented 8 months ago

peter@Peters-MacBook-Pro sample % ../../bin/fpocket -f test.cif POCKET HUNTING BEGINS pdbxplugin) cannot read file test.cif pdbxplugin) error opening file. zsh: segmentation fault ../../bin/fpocket -f test.cif peter@Peters-MacBook-Pro sample % echo $? 139 peter@Peters-MacBook-Pro sample % ../../bin/fpocket -f test.pdb POCKET HUNTING BEGINS ! File 'test.pdb' contains no atoms... ! File 'test.pdb' contains no atoms... ! PDB reading failed! POCKET HUNTING ENDS peter@Peters-MacBook-Pro sample % echo $?
0

pschmidtke commented 8 months ago

integrated behaviour now:

peter@Peters-MacBook-Pro sample % ../../bin/fpocket -f test.pdb POCKET HUNTING BEGINS ! File 'test.pdb' contains no atoms... ! File 'test.pdb' contains no atoms... ! Structure reading failed! peter@Peters-MacBook-Pro sample % echo $? 1 peter@Peters-MacBook-Pro sample % ../../bin/fpocket -f test.cif POCKET HUNTING BEGINS pdbxplugin) cannot read file test.cif pdbxplugin) error opening file. ! Structure reading failed or file is empty! peter@Peters-MacBook-Pro sample % echo $?
1 peter@Peters-MacBook-Pro sample % ../../bin/fpocket -f 1UYD.pdb POCKET HUNTING BEGINS mkdir: 1UYD_out/pockets: File exists POCKET HUNTING ENDS peter@Peters-MacBook-Pro sample % echo $?
0

pschmidtke commented 8 months ago

closing, fixed with : https://github.com/Discngine/fpocket/pull/125