From 75c8047886584b2beb81402ad2a6903857dfabda Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 15 May 2013 10:41:13 -0400 Subject: add -d flag for debugging so verbose doesn't take longer, use generate_kmers instead of a hacky awk --- src/c/quikr_train.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/c/quikr_train.c') diff --git a/src/c/quikr_train.c b/src/c/quikr_train.c index d2a83ef..f19a554 100644 --- a/src/c/quikr_train.c +++ b/src/c/quikr_train.c @@ -10,7 +10,6 @@ #include "quikr_functions.h" -#define AWK_KMER_PERMUTATIONS "awk 'function p(l,v,i){for(i in A) {if(l<%d) p(l+1, (v?v\"\":x)i); else print v\"\"i;}} {A[$0]} END {p(1);} ' <<<$'A\nC\nG\nT'" #define USAGE "Usage:\n\tquikr_train [OPTION...] - to train a database for use with quikr.\n\nOptions:\n\n-i, --input\n\tthe database of sequences to create the sensing matrix (fasta format)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-o, --output\n\tthe sensing matrix. (a gzip'd text file)\n\n-v, --verbose\n\tverbose mode." int main(int argc, char **argv) { @@ -120,8 +119,7 @@ int main(int argc, char **argv) { } // call the probabilities-by-read command - sprintf(kmers_file, AWK_KMER_PERMUTATIONS, kmer); - sprintf(probabilities_command, "%s | probabilities-by-read %d %s /dev/stdin", kmers_file, kmer, fasta_file); + sprintf(probabilities_command, "generate_kmers %d | probabilities-by-read %d %s /dev/stdin", kmer, kmer, fasta_file); FILE *probabilities_output = popen(probabilities_command, "r"); if(probabilities_output == NULL) { fprintf(stderr, "Error could not execute: %s\n", probabilities_command); -- cgit v1.2.3