diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2013-09-05 14:43:56 -0400 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2013-09-05 14:43:56 -0400 |
commit | 96b3a3a22958ff48dae5b2d6bdf81e3c601d6abb (patch) | |
tree | 761dcb9a854d9b168f6a40895de552e350e52feb | |
parent | 2af71f13aa41e0f87d9352297a87402b9d925987 (diff) |
Remove debugging version
remove the debugging option for quikr, since there is not a reason to
keep it anymore, consider it cruft. Our users are unlikely to ever use
it and the same for us
- remove from manpage
- remove from quikr.c
-rw-r--r-- | src/c/quikr.1 | 3 | ||||
-rw-r--r-- | src/c/quikr.c | 30 |
2 files changed, 1 insertions, 32 deletions
diff --git a/src/c/quikr.1 b/src/c/quikr.1 index 4afb52e..ee0960e 100644 --- a/src/c/quikr.1 +++ b/src/c/quikr.1 @@ -49,9 +49,6 @@ verbose mode. .TP .B \-V, --version print version. -.TP -.B \-d, --debug -debug mode, this will save our sensing matrix and sample matrix (A and B matricies) in files called 'sensing.matrix' and 'count.matrix' for debugging purposes .SH EXAMPLES Use quikr to calculate the estimated frequencies for sample.fa, using rdp7.fasta as the sensing matrix we generated with quikr_train. This uses 6-mers by default, and a lambda value of 10000: .P diff --git a/src/c/quikr.c b/src/c/quikr.c index 8389cf4..c209515 100644 --- a/src/c/quikr.c +++ b/src/c/quikr.c @@ -12,7 +12,7 @@ #include "quikr_functions.h" #define sensing_matrix(i,j) (sensing_matrix[width*i + j]) -#define USAGE "Usage:\n\tquikr [OPTION...] - Calculate estimated frequencies of bacteria in a sample.\n\nOptions:\n\n-i, --input\n\tthe sample's fasta file of NGS READS (fasta format)\n\n-f, --sensing-fasta\n\tlocation of the fasta file database used to create the sensing matrix (fasta format)\n\n-s, --sensing-matrix\n\t location of the sensing matrix. (trained from quikr_train)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-l, --lambda\n\tlambda value to use. (default value is 10000)\n\n-o, --output\n\tOTU_FRACTION_PRESENT a vector representing the percentage of database sequence's presence in sample. (csv output)\n\n-v, --verbose\n\tverbose mode.\n\n-V, --version\n\tprint version.\n\n-d, --debug\n\tdebug mode, read manpage for more details" +#define USAGE "Usage:\n\tquikr [OPTION...] - Calculate estimated frequencies of bacteria in a sample.\n\nOptions:\n\n-i, --input\n\tthe sample's fasta file of NGS READS (fasta format)\n\n-f, --sensing-fasta\n\tlocation of the fasta file database used to create the sensing matrix (fasta format)\n\n-s, --sensing-matrix\n\t location of the sensing matrix. (trained from quikr_train)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-l, --lambda\n\tlambda value to use. (default value is 10000)\n\n-o, --output\n\tOTU_FRACTION_PRESENT a vector representing the percentage of database sequence's presence in sample. (csv output)\n\n-v, --verbose\n\tverbose mode.\n\n-V, --version\n\tprint version." int main(int argc, char **argv) { @@ -77,8 +77,6 @@ int main(int argc, char **argv) { case 'o': output_filename = optarg; break; - case 'd': - debug = 1; case 'v': verbose = 1; break; @@ -170,32 +168,6 @@ int main(int argc, char **argv) { for(x = 0; x < width; x++) count_matrix[x] = count_matrix[x] * lambda; - // output our matricies if we are in verbose mode - if(debug) { - FILE *sensing_matrix_fh = fopen( "sensing.matrix", "w"); - if(sensing_matrix_fh == NULL) { - fprintf(stderr, "could not open sensing.matrix for writing.\n"); - exit(EXIT_FAILURE); - } - for(x = 0; x < sequences; x++) { - for( y = 0; y < width; y++) { - fprintf(sensing_matrix_fh, "%.10f\t", sensing_matrix(x, y)); - } - fprintf(sensing_matrix_fh, "\n"); - } - fclose(sensing_matrix_fh); - - FILE *count_matrix_fh = fopen("count.matrix", "w"); - if(count_matrix_fh == NULL) { - fprintf(stderr, "could not open sensing.matrix for writing.\n"); - exit(EXIT_FAILURE); - } - for(x = 0; x < width; x++) { - fprintf(count_matrix_fh, "%.10f\n", count_matrix[x]); - } - fclose(count_matrix_fh); - } - double *solution = nnls(sensing_matrix, count_matrix, sequences, width); // normalize our solution vector |