Skip to content

Commit 98e417c

Browse files
committed
fix --fq and --fa options
1 parent 58fd8bb commit 98e417c

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

BioBloomCategorizer/BioBloomCategorizer.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ int main(int argc, char *argv[])
152152
//advanced options
153153
bool collab = false;
154154

155+
string outputType = "";
155156
string fileListFilename = "";
156157

157158
//long form arguments
@@ -361,8 +362,10 @@ int main(int argc, char *argv[])
361362
exit(1);
362363
} else if (fastq) {
363364
opt::outputType = opt::FASTQ;
365+
outputType = "fq";
364366
} else if (fasta) {
365367
opt::outputType = opt::FASTA;
368+
outputType = "fa";
366369
}
367370

368371
//-w option cannot be used without output method
@@ -408,22 +411,13 @@ int main(int argc, char *argv[])
408411
bbc.setOrderedFilter();
409412
}
410413

411-
string outputType = "";
412-
if (opt::FASTA == opt::outputType) {
413-
outputType == "fa";
414-
}
415-
if (opt::FASTQ == opt::outputType) {
416-
outputType == "fq";
417-
}
418-
419414
//filtering step
420415
//create directory structure if it does not exist
421416
if (paired) {
422417
if (opt::inclusive) {
423418
bbc.setInclusive();
424419
}
425-
if (opt::outputType) {
426-
420+
if (outputType != "") {
427421
if (smartPair) {
428422
bbc.filterPairPrint(inputFiles[0], outputType);
429423
} else {
@@ -457,7 +451,7 @@ int main(int argc, char *argv[])
457451
}
458452
}
459453
} else {
460-
if (opt::outputType != opt::NONE) {
454+
if (outputType != "") {
461455
bbc.filterPrint(inputFiles, outputType);
462456
} else {
463457
bbc.filter(inputFiles);

0 commit comments

Comments
 (0)