|
18 | 18 | from ..common import ( |
19 | 19 | find_polyt_start, reverese_complement, |
20 | 20 | 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, |
22 | 22 | find_optimal_kmer_size, |
23 | 23 | ) |
24 | 24 | from .base import TenXBarcodeDetectionResult, TenXSplitBarcodeDetectionResult, SplittingBarcodeDetectionResult |
@@ -389,7 +389,7 @@ class TenXSplittingBarcodeDetector(TenXBarcodeDetector): |
389 | 389 | def __init__(self, barcode_list: List[str]): |
390 | 390 | super().__init__(barcode_list) |
391 | 391 | 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) |
393 | 393 |
|
394 | 394 | # Maximum allowed distance between R1 end and polyT for a valid split detection. |
395 | 395 | # 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, |
453 | 453 | tso_occurrences = self.tso_indexer.get_occurrences_substr( |
454 | 454 | sequence, tso_search_start, tso_search_end |
455 | 455 | ) |
456 | | - tso_s, tso_e = detect_exact_positions( |
| 456 | + tso_s, tso_e = detect_first_exact_positions( |
457 | 457 | sequence, tso_search_start, tso_search_end + 1, |
458 | 458 | self.tso_indexer.k, self.TSO, |
459 | 459 | tso_occurrences, |
460 | | - min_score=20, start_delta=2, end_delta=2 |
| 460 | + min_score=18, start_delta=3, end_delta=3 |
461 | 461 | ) |
462 | 462 | if tso_s is not None: |
463 | 463 | tso_start = tso_s |
|
0 commit comments