Skip to content

Commit

Permalink
Add filtering on MAPQ to smoother
Browse files Browse the repository at this point in the history
  • Loading branch information
ldenti committed Nov 27, 2023
1 parent ef12b20 commit 7894b19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ static const char INDEX_USAGE_MESSAGE[] =

static const char SMOOTH_USAGE_MESSAGE[] =
"SVDSS smooth --reference <reference> --bam <bam>\n"
" --acc <INT> maximum percentage of errors in alignment (default: 0.02)\n"
" --min-mapq minimum mapping quality (default: 20)\n"
" --threads <INT> number of threads to use (default: 4)\n"
" --help print help message\n";

Expand Down
3 changes: 3 additions & 0 deletions smoother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ bool Smoother::load_batch_bam(int p) {
alignment->core.flag & BAM_FSUPPLEMENTARY ||
alignment->core.flag & BAM_FSECONDARY)
continue;
if (alignment->core.qual < config->min_mapq) {
continue;
}
if (alignment->core.l_qseq < 2) {
// FIXME: why do we need this?
spdlog::warn(
Expand Down

0 comments on commit 7894b19

Please sign in to comment.