File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2323#define LAMBDA_SHARED_MISC_H_
2424
2525#include < unistd.h>
26+ #include < locale>
2627#include < type_traits>
2728#include < forward_list>
2829#include < sys/sysctl.h>
@@ -107,6 +108,10 @@ AlphabetEnum detectSeqFileAlphabet(std::string const & path)
107108
108109 readRecord (meta, seq, infile);
109110
111+ // for the alphabet test, ignore masks
112+ for (char & c : seq)
113+ c = std::toupper (c, std::locale ());
114+
110115 if ((CharString (String<Dna5>(seq)) == seq) || (CharString (String<Rna5>(seq)) == seq))
111116 {
112117 return AlphabetEnum::DNA5;
@@ -123,7 +128,7 @@ AlphabetEnum detectSeqFileAlphabet(std::string const & path)
123128 return AlphabetEnum::AMINO_ACID;
124129 }
125130
126- throw std::runtime_error (" Your query file contains illegal characters in the first sequence.\n " );
131+ throw std::runtime_error (" Your query file contains illegal characters in the first sequence." );
127132
128133 // unreachable
129134 return AlphabetEnum::AMINO_ACID;
You can’t perform that action at this time.
0 commit comments