Skip to content

Commit 0ebfabe

Browse files
committed
relax tso search params
1 parent f875cbf commit 0ebfabe

File tree

1 file changed

+4
-4
lines changed
  • isoquant_lib/barcode_calling/callers

1 file changed

+4
-4
lines changed

isoquant_lib/barcode_calling/callers/tenx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ..common import (
1919
find_polyt_start, reverese_complement,
2020
find_candidate_with_max_score_ssw, find_candidate_with_max_score_ssw_var_len,
21-
detect_exact_positions, str_to_2bit,
21+
detect_exact_positions, detect_first_exact_positions, str_to_2bit,
2222
find_optimal_kmer_size,
2323
)
2424
from .base import TenXBarcodeDetectionResult, TenXSplitBarcodeDetectionResult, SplittingBarcodeDetectionResult
@@ -389,7 +389,7 @@ class TenXSplittingBarcodeDetector(TenXBarcodeDetector):
389389
def __init__(self, barcode_list: List[str]):
390390
super().__init__(barcode_list)
391391
from ..indexers import KmerIndexer as _KmerIndexer
392-
self.tso_indexer = _KmerIndexer([self.TSO], kmer_size=7)
392+
self.tso_indexer = _KmerIndexer([self.TSO], kmer_size=9)
393393

394394
# Maximum allowed distance between R1 end and polyT for a valid split detection.
395395
# Expected: R1...BC(16)...UMI(12)...polyT = ~28bp, allow generous margin.
@@ -453,11 +453,11 @@ def _find_barcode_umi_split_fwd(self, read_id: str, sequence: str,
453453
tso_occurrences = self.tso_indexer.get_occurrences_substr(
454454
sequence, tso_search_start, tso_search_end
455455
)
456-
tso_s, tso_e = detect_exact_positions(
456+
tso_s, tso_e = detect_first_exact_positions(
457457
sequence, tso_search_start, tso_search_end + 1,
458458
self.tso_indexer.k, self.TSO,
459459
tso_occurrences,
460-
min_score=20, start_delta=2, end_delta=2
460+
min_score=18, start_delta=3, end_delta=3
461461
)
462462
if tso_s is not None:
463463
tso_start = tso_s

0 commit comments

Comments
 (0)