Commit 87a31996 authored by Mikaël Salson's avatar Mikaël Salson

should-vdj-to-tap.py: The bug keyword depends on the type of test

BUG will correspond to a sequence not correctly segmented
BUG-LOCUS will correspond to a locus not correctly found

Those keywords are specific to Vidjil and are removed when
creating the curated archive.
parent 0054ad2c
...@@ -100,7 +100,7 @@ curated-vdj.zip: $(SHOULD_VDJ_ARCHIVE) ...@@ -100,7 +100,7 @@ curated-vdj.zip: $(SHOULD_VDJ_ARCHIVE)
$(eval tmpdir := $(shell mktemp -d)) $(eval tmpdir := $(shell mktemp -d))
mkdir $(tmpdir)/curated-vdj mkdir $(tmpdir)/curated-vdj
cp --preserve $(SHOULD_VDJ_ARCHIVE) $(tmpdir)/curated-vdj cp --preserve $(SHOULD_VDJ_ARCHIVE) $(tmpdir)/curated-vdj
sed -r 's/\s*BUG//' -i $(tmpdir)/curated-vdj/* sed -r 's/\s*BUG[A-Z-]+//' -i $(tmpdir)/curated-vdj/*
for file in $(tmpdir)/curated-vdj/*; do mv $$file `echo $$file | sed 's/should/curated/'`; done for file in $(tmpdir)/curated-vdj/*; do mv $$file `echo $$file | sed 's/should/curated/'`; done
cwd=`pwd` && cd $(tmpdir) && zip $$cwd/$@ curated-vdj/* cwd=`pwd` && cd $(tmpdir) && zip $$cwd/$@ curated-vdj/*
rm -rf $(tmpdir) rm -rf $(tmpdir)
......
...@@ -60,7 +60,10 @@ PROG_TAG = '.1' ...@@ -60,7 +60,10 @@ PROG_TAG = '.1'
if args.after_two: if args.after_two:
PROG_TAG = '.2' PROG_TAG = '.2'
SPECIAL_KEYWORDS = ['TODO', 'BUG'] SPECIAL_KEYWORDS = ['TODO']
def special_keywords(after_two):
return SPECIAL_KEYWORDS + ['BUG' + ('-LOCUS' if after_two else '')]
global_failed = 0 global_failed = 0
global_stats = defaultdict(int) global_stats = defaultdict(int)
...@@ -86,7 +89,7 @@ def should_pattern_to_regex(p): ...@@ -86,7 +89,7 @@ def should_pattern_to_regex(p):
if term.startswith('#'): if term.startswith('#'):
return [] return []
if term in SPECIAL_KEYWORDS: if term in special_keywords(args.after_two):
return [] return []
# Ambiguous/alternate pattern # Ambiguous/alternate pattern
...@@ -243,7 +246,7 @@ def should_result_to_tap(should_pattern, result, tap_id): ...@@ -243,7 +246,7 @@ def should_result_to_tap(should_pattern, result, tap_id):
special = False special = False
warn = False warn = False
for kw in SPECIAL_KEYWORDS: for kw in special_keywords(args.after_two):
if kw in should_pattern: if kw in should_pattern:
tap += '# %s ' % kw tap += '# %s ' % kw
special = True special = True
......
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