Skip to content

Commit

Permalink
Merge pull request #2653 from vgteam/filter-default
Browse files Browse the repository at this point in the history
Make filters actually be off when not activated
  • Loading branch information
jeizenga authored Feb 21, 2020
2 parents a8711c4 + 0a9352e commit 9509e3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/readfilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ class ReadFilter{
/// If a read has one of the features in this set as annotations, the read
/// is filtered out.
unordered_set<string> excluded_features;
double min_secondary = 0.;
double min_primary = 0.;
double min_secondary = numeric_limits<double>::lowest();
double min_primary = numeric_limits<double>::lowest();
/// Should we rescore each alignment with default parameters and no e.g.
/// haplotype info?
bool rescore = false;
bool frac_score = false;
bool sub_score = false;
int max_overhang = 99999;
int min_end_matches = 0;
int max_overhang = numeric_limits<int>::max() / 2;
int min_end_matches = numeric_limits<int>::min() / 2;
bool verbose = false;
double min_mapq = 0.;
double min_mapq = numeric_limits<double>::lowest();
int repeat_size = 0;
/// Should we drop split reads that follow edges not in the graph?
bool drop_split = false;
Expand Down Expand Up @@ -78,9 +78,9 @@ class ReadFilter{
bool filter_on_all = false;

// minimum base quality as PHRED score
int min_base_quality = 0;
int min_base_quality = numeric_limits<int>::min() / 2;
// minimum fraction of bases in reads that must have quality at least <min_base_quality>
double min_base_quality_fraction = 0.0;
double min_base_quality_fraction = numeric_limits<double>::lowest();

// Keep some basic counts for when verbose mode is enabled
struct Counts {
Expand Down
4 changes: 2 additions & 2 deletions src/subcommand/filter_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void help_filter(char** argv) {
<< " -N, --name-prefixes FILE keep reads with names with one of many prefixes, one per nonempty line" << endl
<< " -X, --exclude-contig REGEX drop reads with refpos annotations on contigs matching the given regex (may repeat)" << endl
<< " -F, --exclude-feature NAME drop reads with the given feature in the \"features\" annotation (may repeat)" << endl
<< " -s, --min-secondary N minimum score to keep secondary alignment [default=0]" << endl
<< " -r, --min-primary N minimum score to keep primary alignment [default=0]" << endl
<< " -s, --min-secondary N minimum score to keep secondary alignment" << endl
<< " -r, --min-primary N minimum score to keep primary alignment" << endl
<< " -O, --rescore re-score reads using default parameters and only alignment information" << endl
<< " -f, --frac-score normalize score based on length" << endl
<< " -u, --substitutions use substitution count instead of score" << endl
Expand Down

2 comments on commit 9509e3e

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for merge to master. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 11003 seconds

Tests produced 681 warnings. 681 were for lower-than-expected alignment scores

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch v1.22.0. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 10621 seconds

Tests produced 680 warnings. 680 were for lower-than-expected alignment scores

Please sign in to comment.