File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -910,16 +910,24 @@ void cmaple::Alignment::readMaple(std::istream& aln_stream) {
910
910
" sequence length (" +
911
911
convertPosTypeToString (static_cast <PositionType>(ref_seq.size ())) + " )!" );
912
912
}
913
- } else if (cmaple::verbose_mode >= cmaple::VB_MED) {
914
- outWarning (" Ignoring <Length> of " + tmp +
915
- " . <Length> is only appliable for 'N' or '-'." );
913
+ } else if (cmaple::verbose_mode >= cmaple::VB_MED) {
914
+ outWarning (" Ignoring <Length> of " + tmp +
915
+ " . <Length> is only appliable for 'N' or '-'." );
916
+ }
916
917
}
917
- }
918
918
919
919
// add a new mutation into mutations
920
920
if (state == TYPE_N || state == TYPE_DEL) {
921
921
mutations.emplace_back (state, pos - 1 , length);
922
922
} else {
923
+ StateType refState = ref_seq[pos - 1 ];
924
+ if (refState == state)
925
+ {
926
+ throw std::logic_error (
927
+ " Mutation at position " + convertPosTypeToString (pos) +
928
+ " in sequence " + seq_name +
929
+ " is equal to reference nucleotide. Check reference and alignment are correct." );
930
+ }
923
931
mutations.emplace_back (state, pos - 1 );
924
932
}
925
933
}
You can’t perform that action at this time.
0 commit comments