Skip to content
Snippets Groups Projects
Commit 7e67355f authored by valerio's avatar valerio
Browse files

Capitalized ext support for mol and seq

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1863 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent ae849766
Branches
Tags
No related merge requests found
......@@ -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") {
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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") {
......
......@@ -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") {
......
......@@ -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") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment