diff --git a/CommandLineParser.c b/CommandLineParser.c index e10b1a0..f756985 100644 --- a/CommandLineParser.c +++ b/CommandLineParser.c @@ -97,7 +97,7 @@ int parseCommandLine (int argc, char *argv[]) int o; int index; char *fastaFile = NULL; - + readGroup[0] = 0; sampleName[0] = 0; libName[0] = 0; @@ -118,6 +118,7 @@ int parseCommandLine (int argc, char *argv[]) {"search", required_argument, 0, 's'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, + {"quiet", no_argument, 0, 'q'}, {"seq", required_argument, 0, 'x'}, {"seq1", required_argument, 0, 'x'}, {"seq2", required_argument, 0, 'y'}, @@ -210,6 +211,10 @@ int parseCommandLine (int argc, char *argv[]) fprintf(stderr, "mrFAST %s.%s with FastHASH\n", versionNumber, versionNumberF); return 0; break; + case 'q': + if (freopen("/dev/null", "w", stderr) == NULL) + fprintf(stderr, "Quiet mode failure.\n"); + break; case '?': fprintf(stderr, "Unknown parameter: %s\n", longOptions[index].name); abort(); diff --git a/HashTable.c b/HashTable.c index 47be0ea..dfb2560 100644 --- a/HashTable.c +++ b/HashTable.c @@ -286,7 +286,7 @@ void finalizeLoadingIHashTable() } /**********************************************/ -int loadIHashTable(double *loadTime, int errThreshould) +int loadIHashTable(double *loadTime) { double startTime = getTime(); unsigned char extraInfo = 0; @@ -426,7 +426,6 @@ int initLoadingHashTable(char *fileName) tmp = fread(&WINDOW_SIZE, sizeof(WINDOW_SIZE), 1, _ih_fp); - fprintf(stderr, "Hash table kmer length: %d\n", WINDOW_SIZE); configHashTable(); if (_ih_maxHashTableSize != pow(4, WINDOW_SIZE)) diff --git a/HashTable.h b/HashTable.h index 78de5f9..e34a7cc 100644 --- a/HashTable.h +++ b/HashTable.h @@ -66,7 +66,7 @@ int initLoadingHashTable(char *fileName); HashTable *getHashTable(); void (*generateHashTable)(char *fileName, char *indexName); -int (*loadHashTable)(double *loadTime, int errThreshould); +int (*loadHashTable)(double *loadTime); void (*finalizeLoadingHashTable)(); unsigned int *(*getCandidates)(int hv); diff --git a/baseFAST.c b/baseFAST.c index 5f350c2..8d2f590 100644 --- a/baseFAST.c +++ b/baseFAST.c @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) do { - flag = loadHashTable ( &tmpTime, errThreshold); // Reading a fragment + flag = loadHashTable ( &tmpTime); // Reading a fragment curGen = getRefGenomeName(); // First Time @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) do { - flag = loadHashTable ( &tmpTime , errThreshold); // Reading a fragment + flag = loadHashTable ( &tmpTime); // Reading a fragment curGen = getRefGenomeName(); // First Time