Skip to content

Commit

Permalink
Read in PSSM matrices without crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
pkerpedjiev committed Apr 22, 2014
1 parent 46d725c commit ac940a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kseq.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ typedef struct __kstring_t {
seq->seq.m = 256; \
seq->seq.s = (char*)malloc(seq->seq.m); \
} \
while ((c = ks_getc(ks)) != -1 && c != '>' && c != '+' && c != '@') { \
while ((c = ks_getc(ks)) != -1 && c != '>' && c != '+' && c != '@' && c != '&') { \
if (c == '\n') continue; /* skip empty lines */ \
seq->seq.s[seq->seq.l++] = c; /* this is safe: we always have enough space for 1 char */ \
ks_getuntil2(ks, KS_SEP_LINE, &seq->seq, 0, 1); /* read the rest of the line */ \
Expand Down
2 changes: 1 addition & 1 deletion pssm.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ PSSM init_matrix(int order, int length, int alphabet_size){

// Check if longer than max-length of PSSMs
if(length >= MAXPSSMSIZE) {
fprintf(stderr,"Matrix is to long.");
fprintf(stderr,"Matrix is too long: %d", length);
return NULL;
}

Expand Down

0 comments on commit ac940a3

Please sign in to comment.