UCLOrengoGroup / cath-tools

Protein structure comparison tools such as SSAP and SNAP
http://cath-tools.readthedocs.io
GNU General Public License v3.0
59 stars 14 forks source link

Running cath-ssaps on files in other directories can causes errors #35

Open tonyelewis opened 7 years ago

tonyelewis commented 7 years ago

Eg cath-ssap ../1c0pA01 ../1hdoA00 gives:

Cannot open file "./../1c0pA01../1hdoA00.list" for writing [ios_base::clear: unspecified iostream_category error] : No such file or directory
Whilst running program /cath-tools/ninja_clang_relwithdebinfo/cath-ssap (via a program_exception_wrapper with typeid: "N4cath30ssap_program_exception_wrapperE"), caught a boost::exception:
../source/common/file/open_fstream.hpp(72): Throw in function void cath::common::detail::open_fstream_impl(fstream_t &, const boost::filesystem::path &, const std::ios_base::openmode &, const cath::common::detail::fstream_type &) [fstream_t = std::__1::basic_ofstream<char, std::__1::char_traits<char> >]
Dynamic exception type: boost::exception_detail::clone_impl<cath::common::runtime_error_exception>
std::exception::what: Cannot open file "./../1c0pA01../1hdoA00.list" for writing [ios_base::clear: unspecified iostream_category error] 
tonyelewis commented 7 years ago

Implementation note:

tonyelewis commented 7 years ago

I've made some effort towards improving the handling of names in 9831df90967e076fd552ec9261b56cb4e7e57027.

This leaves me clearer that the original cath-ssap command is in error because the positional arguments are being treated as IDs. Instead, the same could be achieved with:

cath-ssap --pdb-path .. 1c0pA01 1hdoA00

That said, cath-ssap should: