diff --git a/modules/io/src/mol/entity_io_crd_handler.cc b/modules/io/src/mol/entity_io_crd_handler.cc index 5d730787a8fdf42ec722f0601c229126adc3471c..8cd61e3e9ee486ad7520b88c71db42d35eeef7f6 100644 --- a/modules/io/src/mol/entity_io_crd_handler.cc +++ b/modules/io/src/mol/entity_io_crd_handler.cc @@ -181,7 +181,9 @@ namespace { bool crd_handler_is_responsible_for(const boost::filesystem::path& loc, const String& type) { if(type=="auto") { - if( detail::FilenameEndsWith(loc.string(),".crd") || detail::FilenameEndsWith(loc.string(),".crd.gz") ) { + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if( detail::FilenameEndsWith(match_suf_string,".crd") || detail::FilenameEndsWith(match_suf_string,".crd.gz") ) { return true; } } else if(type=="crd") { diff --git a/modules/io/src/mol/entity_io_pdb_handler.cc b/modules/io/src/mol/entity_io_pdb_handler.cc index 3ab18599f8c5d899d510029f105543967abb531b..ca64835e7372b51d8b7089d0197ce47cb04c6f96 100644 --- a/modules/io/src/mol/entity_io_pdb_handler.cc +++ b/modules/io/src/mol/entity_io_pdb_handler.cc @@ -76,9 +76,11 @@ namespace { 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(),".pqr") || - detail::FilenameEndsWith(loc.string(),".ent.gz")){ + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if(detail::FilenameEndsWith(match_suf_string,".pdb") || detail::FilenameEndsWith(match_suf_string,".ent") || + detail::FilenameEndsWith(match_suf_string,".pdb.gz") || detail::FilenameEndsWith(match_suf_string,".pqr") || + detail::FilenameEndsWith(match_suf_string,".ent.gz")){ return true; } diff --git a/modules/io/src/mol/entity_io_sdf_handler.cc b/modules/io/src/mol/entity_io_sdf_handler.cc index 49b699024f066320d57381c87e551c0c0043ecc0..9ec62a2e6adf1596d6f3b155aa05761c84283089 100644 --- a/modules/io/src/mol/entity_io_sdf_handler.cc +++ b/modules/io/src/mol/entity_io_sdf_handler.cc @@ -409,7 +409,9 @@ namespace { bool sdf_handler_is_responsible_for(const boost::filesystem::path& loc, const String& type) { if(type=="auto") { - if(detail::FilenameEndsWith(loc.string(),".sdf")) { + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if(detail::FilenameEndsWith(match_suf_string,".sdf")) { return true; } diff --git a/modules/io/src/seq/clustal_io_handler.cc b/modules/io/src/seq/clustal_io_handler.cc index 3456befad32648b5551ed4ec41a31bbefeea4554..be1d5c2133c51b516930ad9334baadc468610522 100644 --- a/modules/io/src/seq/clustal_io_handler.cc +++ b/modules/io/src/seq/clustal_io_handler.cc @@ -51,7 +51,9 @@ void ClustalIOHandler::Export(const seq::ConstSequenceList& msa, bool ClustalIOHandler::ProvidesImport(const boost::filesystem::path& loc, const String& format) { if (format=="auto") { - if (detail::FilenameEndsWith(loc.string(),".aln")) { + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if (detail::FilenameEndsWith(match_suf_string,".aln")) { return true; } } else if(format=="clustal") { diff --git a/modules/io/src/seq/fasta_io_handler.cc b/modules/io/src/seq/fasta_io_handler.cc index 6a6a5f1037cfca5aa745cd17c99c4a897375df13..919902088ea0a312a0acc48a27ca1cb6d996899d 100644 --- a/modules/io/src/seq/fasta_io_handler.cc +++ b/modules/io/src/seq/fasta_io_handler.cc @@ -56,11 +56,11 @@ void FastaIOHandler::Export(const seq::ConstSequenceList& msa, bool FastaIOHandler::ProvidesImport(const boost::filesystem::path& loc, const String& format) { if (format=="auto") { - - - if (detail::FilenameEndsWith(loc.string(),".fasta") || detail::FilenameEndsWith(loc.string(),".fa") || - detail::FilenameEndsWith(loc.string(),".fna") || detail::FilenameEndsWith(loc.string(),".fsa") || - detail::FilenameEndsWith(loc.string(),".fas") ) { + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if (detail::FilenameEndsWith(match_suf_string,".fasta") || detail::FilenameEndsWith(match_suf_string,".fa") || + detail::FilenameEndsWith(match_suf_string,".fna") || detail::FilenameEndsWith(match_suf_string,".fsa") || + detail::FilenameEndsWith(match_suf_string,".fas") ) { return true; } } else if(format=="fasta") { diff --git a/modules/io/src/seq/promod_io_handler.cc b/modules/io/src/seq/promod_io_handler.cc index 518c6b34eb8e4eed2e75a89bb5cfb36022dc4e52..89246dd4c9637648b13c53bd5c67503dd587a652 100644 --- a/modules/io/src/seq/promod_io_handler.cc +++ b/modules/io/src/seq/promod_io_handler.cc @@ -52,7 +52,9 @@ void PromodIOHandler::Export(const seq::ConstSequenceList& msa, bool PromodIOHandler::ProvidesImport(const boost::filesystem::path& loc, const String& format) { if (format=="auto") { - if (detail::FilenameEndsWith(loc.string(),".ali")) { + String match_suf_string=loc.string(); + std::transform(match_suf_string.begin(),match_suf_string.end(),match_suf_string.begin(),tolower); + if (detail::FilenameEndsWith(match_suf_string,".ali")) { return true; } } else if(format=="promod") {