diff --git a/modules/io/src/img/map_io_mrc_handler.cc b/modules/io/src/img/map_io_mrc_handler.cc index 924af5c13e8c34398e5916dde07eb185aa6dca8b..b1513a21d48257d05ab8a4d2ea5b23ebe9d2ac6b 100644 --- a/modules/io/src/img/map_io_mrc_handler.cc +++ b/modules/io/src/img/map_io_mrc_handler.cc @@ -905,6 +905,9 @@ void MapIOMrcHandler::Import(img::MapHandle& sh, const boost::filesystem::path& } in.push(boost::iostreams::file_source(loc.string())); in.read(reinterpret_cast<char*>(&header_),256); + // seekg does not work on compressed streams + // the only way to rewind is closing and reopening the stream + // by popping out the file source and pushing it in again in.pop(); in.push(boost::iostreams::file_source(loc.string())); is_file_=true; @@ -941,7 +944,7 @@ void MapIOMrcHandler::Import(img::MapHandle& sh, std::istream& loc, const ImageF detail::import_endianess_switcher<detail::ccp4_header>(sh,loc,head_str,formatmrc); } else { unsigned char header_content[256]; - memcpy(&header_content,&header_,256*sizeof(char)); + memcpy(&header_content[0],&header_,256*sizeof(char)); if (MatchContent(header_content) == true) { LOGN_DEBUG("mrc io: importing new style format"); detail::import_endianess_switcher<detail::ccp4_header>(sh,loc,head_str,formatmrc); diff --git a/modules/io/src/img/map_io_spi_handler.hh b/modules/io/src/img/map_io_spi_handler.hh index ac62117b1b45066e0a1709e2a8d3982e1022d913..f51093d4be7afa2707e1d5966edbc11977875e26 100644 --- a/modules/io/src/img/map_io_spi_handler.hh +++ b/modules/io/src/img/map_io_spi_handler.hh @@ -66,7 +66,7 @@ class DLLEXPORT_OST_IO MapIOSpiHandler: public MapIOHandler static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& loc); static String GetFormatName() { return String("Spider"); }; - static String GetFormatDescription() { return String("Format sued by the Spider software package"); }; + static String GetFormatDescription() { return String("Format used by the Spider software package"); }; protected: void do_import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); diff --git a/modules/io/src/io_utils.hh b/modules/io/src/io_utils.hh index 677b3024a84625dce480ded7bb125d47f8823edd..4f404444dde37720144fbcd504d356bbe9bfd822 100644 --- a/modules/io/src/io_utils.hh +++ b/modules/io/src/io_utils.hh @@ -20,11 +20,13 @@ #ifndef OST_IO_UTIL_HH #define OST_IO_UTIL_HH +#include <ost/io/module_config.hh> #include <ost/base.hh> + namespace ost { namespace io { namespace detail { -bool FilenameEndsWith(const String& target,const String& probe); +bool DLLEXPORT_OST_IO FilenameEndsWith(const String& target,const String& probe); }}} // ns diff --git a/modules/io/src/mol/entity_io_pdb_handler.cc b/modules/io/src/mol/entity_io_pdb_handler.cc index 8ec58b26c76d892aa2fc73231f1b460035269b67..3ab18599f8c5d899d510029f105543967abb531b 100644 --- a/modules/io/src/mol/entity_io_pdb_handler.cc +++ b/modules/io/src/mol/entity_io_pdb_handler.cc @@ -77,7 +77,8 @@ bool pdb_handler_is_responsible_for(const boost::filesystem::path& loc, const String& type) { if(type=="auto") { if(detail::FilenameEndsWith(loc.string(),".pdb") || detail::FilenameEndsWith(loc.string(),".ent") || - detail::FilenameEndsWith(loc.string(),".pdb.gz") || detail::FilenameEndsWith(loc.string(),".par") ){ + detail::FilenameEndsWith(loc.string(),".pdb.gz") || detail::FilenameEndsWith(loc.string(),".pqr") || + detail::FilenameEndsWith(loc.string(),".ent.gz")){ return true; } diff --git a/modules/io/src/seq/fasta_io_handler.cc b/modules/io/src/seq/fasta_io_handler.cc index af2b2db50e9d39da1f1b02b175c8f49e025dfaf4..6a6a5f1037cfca5aa745cd17c99c4a897375df13 100644 --- a/modules/io/src/seq/fasta_io_handler.cc +++ b/modules/io/src/seq/fasta_io_handler.cc @@ -59,7 +59,7 @@ bool FastaIOHandler::ProvidesImport(const boost::filesystem::path& loc, if (detail::FilenameEndsWith(loc.string(),".fasta") || detail::FilenameEndsWith(loc.string(),".fa") || - detail::FilenameEndsWith(loc.string(),".fnaa") || detail::FilenameEndsWith(loc.string(),".fsa") || + detail::FilenameEndsWith(loc.string(),".fna") || detail::FilenameEndsWith(loc.string(),".fsa") || detail::FilenameEndsWith(loc.string(),".fas") ) { return true; }