Commit 419bdf94 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-a/3949-alternative-regex-bug' into 'dev'

Alternative regex bug

Closes #3949

See merge request !489
parents d6d3c13b 276ff5e8
Pipeline #86315 passed with stages
in 6 minutes and 3 seconds
>IGHV1-18 (IGHJ1, IGHJ2)
atggagctgaggagcctgagatctgacgacacggccgtgtattactgtgcgagagagctgaatacttccagcactggggccagggcaccctggtcaccgtctcctcag
......@@ -168,7 +168,7 @@ def should_pattern_to_regex(p):
if len(r) > 1 and r[1][0] == '|':
# We have an alternative
regex_pattern = '('+' '.join(r)+').*'
regex_pattern = '.*('+''.join(r)+')'
else:
regex_pattern = '.*'.join(r)
......@@ -248,6 +248,17 @@ def should_result_to_tap(should_pattern, result, tap_id):
True
>>> srtt_ok(should, other_allele)
True
>>> should = 'TRAV1-1 TRAJ1'
>>> other = 'TRAV1-1*01 1/ACG/3 TRAJ1*01'
>>> (args.ignore_N, args.ignore_del) = (True, True)
>>> srtt_ok(should, other)
True
>>> should = 'TRAV1-1 (TRAJ1, TRAJ2)'
>>> other = 'TRAV1-1*01 1/ACG/3 TRAJ1*01'
>>> srtt_ok(should, other)
True
'''
m_locus = r_locus.search(should_pattern)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment