Commit f4ea57a5 authored by Mikaël Salson's avatar Mikaël Salson

should-vdj-to-tap.py: Bad escape of single quotes

Single quotes can appear with 5' or 3' for instance.
In Bash we cannot directly escape a single quote inside a single-quoted string.
We have to close the string, escape the single quote, and then open again the string.

Follows b48e4e36 and fixes #2178
parent 300773e7
......@@ -217,8 +217,8 @@ def should_result_to_tap(should_pattern, result, tap_id):
should_regex = should_pattern_to_regex(should_pattern)
# match = should_regex.search(result)
match = os.system("echo '%s' | grep -E '%s' > /dev/null 2>&1" \
% (result.replace("'", "\\'"),
should_regex.pattern.replace("'", "\\'")))
% (result.replace("'", "'\\''"),
should_regex.pattern.replace("'", "'\\''")))
found = (match == 0)
globals()['global_stats'][locus] += 1
......
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