diff options
Diffstat (limited to 'src/c/quikr.c')
-rw-r--r-- | src/c/quikr.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/c/quikr.c b/src/c/quikr.c index de1f39a..202c7dc 100644 --- a/src/c/quikr.c +++ b/src/c/quikr.c @@ -131,25 +131,23 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } + // load sensing matrix + struct matrix *sensing_matrix = load_sensing_matrix(sensing_matrix_filename, kmer); + if(kmer == 0) { - fprintf(stderr, "Error: zero is not a valid kmer\n"); - exit(EXIT_FAILURE); + fprintf(stdout, "Warning: zero is not a valid kmer, inferring kmer from sensing matrix (%d)\n", sensing_matrix->kmer); + kmer = sensing_matrix->kmer; } - // 4 "ACGT" ^ Kmer gives us the size of output rows width = pow_four(kmer); - // load sensing matrix - struct matrix *sensing_matrix = load_sensing_matrix(sensing_matrix_filename, kmer); - if(verbose) { printf("width: %llu\n", width); printf("sequences: %llu\n", sensing_matrix->sequences); } - // load counts matrix double *count_matrix = malloc(width * sizeof(double)); check_malloc(count_matrix, NULL); |