Skip to content

Commit

Permalink
Wrapped warnings in if statement as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
scwatts committed May 29, 2017
1 parent 63df31e commit 76cb2e8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/fastspar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ int main(int argc, char **argv) {
}

// Print warnings
fprintf(stderr, "\nWarning: the following OTUs have only one unique permutation and it is recommended to remove them from this analysis:\n");
for (auto &i : invariant_otus) {
fprintf(stderr, "\t%s (row %d)\n", otu_table.otu_ids[i].c_str(), i);
}
fprintf(stderr, "\n");
if (! invariant_otus.empty()) {
fprintf(stderr, "\nWarning: the following OTUs have only one unique permutation and it is recommended to remove them from this analysis:\n");
for (auto &i : invariant_otus) {
fprintf(stderr, "\t%s (row %d)\n", otu_table.otu_ids[i].c_str(), i);
}
fprintf(stderr, "\n");

// Prompt user for continue
if (! fastspar_options.assume_yes) {
if (continue_exit_prompt() == false) {
return 0;
// Prompt user for continue
if (! fastspar_options.assume_yes) {
if (continue_exit_prompt() == false) {
return 0;
}
}
}

Expand Down

0 comments on commit 76cb2e8

Please sign in to comment.