noporpoise / seq-align

Fast, portable C implementations of Needleman-Wunsch and Smith-Waterman sequence alignment
94 stars 39 forks source link

--case_sensitive option not (always) effective #10

Open threadless-screw opened 5 years ago

threadless-screw commented 5 years ago

The output of the following two commands is the same...

smith_waterman NeeDLE NEEDLE
smith_waterman --case_sensitive NeeDLE NEEDLE

namely:

== Alignment 0 lengths (6, 6):

hit 0.0 score: 12
  NeeDLE  [pos: 0; len: 6]
  NEEDLE  [pos: 0; len: 6]

==

The practical cause of the issue seems to be that the cmdline_new() function [in alignment_cmdline.c] fails to feed an identified --case_sensitive option into scoring, e.g. like so:

if(strcasecmp(argv[argi], "--case_sensitive") == 0)
      {
        scoring->case_sensitive = true;
      }