Permalink
Browse files

+ bugfix -- update to version 0.4.3

  Adjust handling with search patterns that have lengths that are
  greater than the length of the sequence reads.

  When performing exact searches :
      -- display error and exit
  When performing approximate searches, or using the regex engine :
      -- continue on with the search.  The TRE engine correctly
         handles this type of case.
  • Loading branch information...
1 parent 14d48a1 commit 99993e4fba61b678b92a2675f55a2ff1c30b2a43 @indraniel committed Aug 3, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 fqgrep.c
View
6 fqgrep.c
@@ -30,7 +30,7 @@
#include "bm.h"
/* D E F I N E S *************************************************************/
-#define VERSION "0.4.2"
+#define VERSION "0.4.3"
#define PRG_NAME "fqgrep"
#define FASTQ_FILENAME_MAX_LENGTH 1024
#define MAX_PATTERN_LENGTH 1024
@@ -386,7 +386,9 @@ search_input_fastq_file(FILE *out_fp,
// read sequence
while ( (l = kseq_read(seq)) >= 0 ) {
- if ( strlen(seq->seq.s) < strlen(opts.search_pattern) ) {
+ if ( (strlen(seq->seq.s) < strlen(opts.search_pattern)) &&
+ (opts.max_mismatches == 0) &&
+ (opts.force_tre == 0) ) {
fprintf(stderr, "%s : %s '%s' %s (%zd) %s (%zd).\n",
PRG_NAME,
"[err] For sequence ",

0 comments on commit 99993e4

Please sign in to comment.