Skip to content

Commit

Permalink
chore(call): truncate max reads instead of skipping locus
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Jun 15, 2024
1 parent 5bf3e14 commit 121d308
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/caller_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* `--min-reads ##`: Minimum number of supporting reads needed to make a call. **Default:** 4
* `--min-allele-reads ##`: Minimum number of supporting reads needed to call a specific allele size.
**Default:** 2
* `--max-reads ##`: Maximum number of supporting reads before a locus is skipped. **Default:** 250
* `--max-reads ##`: Maximum number of supporting reads to use for calling a locus. **Default:** 250
* `--min-avg-phred ##`: Minimum average PHRED score for relevant bases (flanking region + tandem repeat).
Read segments with average PHRED scores below this (common with a threshold of ~13 and ONT Ultra Long reads,
for example) will be skipped. **Default:** 13
Expand Down
5 changes: 2 additions & 3 deletions strkit/call/call_locus.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,8 @@ def call_locus(

logger_.debug(f"{locus_log_str} - got {n_overlapping_reads} overlapping aligned segments")

if n_overlapping_reads > params.max_reads:
logger_.warning(f"{locus_log_str} - skipping locus; too many overlapping reads")
return locus_result
if n_overlapping_reads > params.max_reads: # TODO: sample across full set instead?
logger_.warning(f"{locus_log_str} - locus has excess reads, using the first {params.max_reads}; misalignment?")

sorted_read_lengths = np.sort(read_lengths)

Expand Down

0 comments on commit 121d308

Please sign in to comment.