Commit 98a88bff authored by florian.thonier's avatar florian.thonier
parents b0c0faf1 070e6116
# ./vidjil -g /Users/magiraud/vidjil/germline -A algo/tests/bugs/bug20150909.fa
# The sequences are segmented, but not fine-segmented (UNSEG < delta_min)
>R
GACATAGCTACCTACTACTGTGCCTTGTGGCACAACACTTGTTGTCACAGGTAAGTATCG
>B
CAGCAGGAGGACTCGGCCGTGTATCTCTGTGCCAGCAGCTTTAGCACAGATACGCAGTATTTTGGCCCAGGCACCCGGCTGACAGTGCTCGGTAAGCGGGGGCTCCCGCTGAAGCCCGGGAACTGGGGAGGGGGCGCCCCGGGACGCCGGG
>TRGV9*01_6/C/29_TRGJ1*02__TRG
GACATAGCTACCTACTACTGTGCCTTGTGG
C
ACAACACTTGTTGTCACAGGTAAGTATCG
>TRBV7-2*01_4/T/0_TRBJ2-3*01__TRB
CAGCAGGAGGACTCGGCCGTGTATCTCTGTGCCAGCAGCTT
T
AGCACAGATACGCAGTATTTTGGCCCAGGCACCCGGCTGACAGTGCTCGGTAAGCGGGGGCTCCCGCTGAAGCCCGGGAACTGGGGAGGGGGCGCCCCGGGACGCCGGG
>IGHV3-11*01_1/CCCCCGAGAGCCGAGGGGGGGAGAGATCCCGGGGGG/6_IGHD6-6*01_1/TCCAGCTCGTCCGGGGG/12_IGHJ4*02__IGH
GGGCTGGAGTGGGTTTCATACATTAGTAGTAGTGGTAGTACCATATACTACGCAGACTCTGTGAAGGGCCGATTCACCATCTCCAGGGACAACGCCAAGAACTCACTGTATCTGCAAATGAACAGCCTGAGAGCCGAGGACACGGCCGTGTATTACTGTGCGAGAGCCCCCGAGAGCCGAGGGGGGGAGAGATCCCGGGGGGAGCAGCTCGTCTCCAGCTCGTCCGGGGGACTGGGGCCAGGGAACCCTGGTCACCGTCTCCTCAGGT
>IGHV3-9*01_11/A/5_IGHD2-2*02_1/GGAATACGATATTTTGACTGGT/8_IGHJ6*03__IGH
GGGGGAGGCTTGGTACAGCCTGGCAGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTTGATGATTATGCCATGCACTGGGTCCGGCAAGCTCCAGGGAAGGGCCTGGAGTGGGTCTCAGGTATTAGTTGGAATAGTGGTAGCATAGGCTATGCGGACTCTGTGAAGGGCCGATTCACCATCTCCAGAGACAACGCCAAGAACTCCCTGTATCTGCAAATGAACAGTCTGAGAGCTGAGGACACGGCCTTGTATTACTGAATTGTAGTAGTACCAGCTGCTATACGGAATACGATATTTTGACTGGTTACTACTACTACATGGACGTCTGGGGCAAAGGGACCCTGGTCACCGTCTCCTCAGGT
>TRGV2*01_1/C/0_TRGJ1*02__TRG
GGAAGGCCCCACAGCGTCTTCAGTACTATGACTCCTACAACTCCAAGGTTGTGTTGGAATCAGGAGTCAGTCCAGGGAAGTATTATACTTACGCAAGCACAAGGAACAACTTGAGATTGATACTGCGAAATCTAATTGAAAATGACTCTGGGGTCTATTACTGTGCCACCTGGGACGGCTTATTATAAGAAACTCTTTGGCAGTGGAACAACAC
>TRGV3*01_0/CC/0_TRGJ1*01__TRG
GGAAGGCCCCACAGCGTCTTCTGTACTATGACGTCTCCACCGCAAGGGATGTGTTGGAATCAGGACTCAGTCCAGGAAAGTATTATACTCATACACCCAGGAGGTGGAGCTGGATATTGAGACTGCAAAATCTAATTGAAAATGATTCTGGGGTCTATTACTGTGCCACCTGGGACAGGCCGAATTATTATAAGAAACTCTTTGGCAGTGGAACAACAC
>TRGV9*01_8/CTCACGAGGG/3_TRGJP1*01__TRG
CGGCACTGTCAGAAAGGAATCCGGCATTCCGTCAGGCAAATTTGAGGTGGATAGGATACCTGAAACGTCTACATCCACTCTCACCATTCACAATGTAGAGAAACAGGACATAGCTACCTACTACTGTGCCTGTCTCACGAGGGCCACTGGTTGGTTCAAGATATTTGCTGAAGGGACTAAGCTCATAGTAACTTCGCCTGGTAA
>IGKV3-7*04_1/GTGGA/11_KDE__IGK+
CCCAGGCTCCTCATCTATGATGCATCCACCAGGGCCACTAGCATCCCAGCCAGGTTCAGTGGCAGTGGGTCTGGGACAGACTTCACTCTCACCATCAGCAGCCTGCAGCCTGAAGATTTTGCAGTTTATTACTGTCAGCAGGATTATAACTTACCTCGTGGAGGCAGCCCAGGGCGACTCCTCATGAGTCTGCAGCTGCATTTTTGCCATATCCACTATTTGGAGTCTGACCTCCCTAGGAAGCCTCCCTGCTCCCTAGGACAACCTGCTCTGACCTCTGAGG
>TRGV2*01_9/CCCTGG/1_TRGJP1*01__TRG
GGAAGGCCCCACAGCGTCTTCAGTACTATGACTCCTACAACTCCAAGGTTGTGTTGGAATCAGGAGTCAGTCCAGGGAAGTATTATACTTACGCAAGCACAAGGAACAACTTGAGATTGATACTGCGAAATCTAATTGAAAATGACTTTGGGGTCTATTACTGTGCCACCCCCTGGTACCACTGGTTGGTTCAAGATATTTGCTGAAGGGACTAAGCTCATAGTAACTTCGCCTGGTAA
# or TRGJ1*01
>TRGV5*01_0/CAGAGG/7_TRGJ1*02__TRG
GGAAGGCCCCACAGCGTCTTCTGTACTATGACGTCTCCAACTCAAAGGATGTGTTGGAATCAGGACTCAGTCCAGGAAAGTATTATACTCATACACCCAGGAGGTGGAGCTGGATATTGATACTACGAAATCTAATTGAAAATGATTCTGGGGTCTATTACTGTGCCACCTGGGACAGGCAGAGGAAGAAACTCTTTGGCAGTGGAACAACAC
# or TRDV2*03
>TRDV2*01_0/C/1_TRDD3*01_4/CCGCCT/0_TRAJ29*01__TRA+D
ATACCGAGAAAAGGACATCTATGGCCCTGGTTTCAAAGACAATTTCCAAGGTGACATTGATATTGCAAAGAACCTGGCTGTACTTAAGATACTTGCACCATCAGAGAGAGATGAAGGGTCTTACTACTGTGCCTGTGACACCCCTGGGGGACCGCCTGGAATTCAGGAAACACACCTCTTGTCTTTGGAAAGGGCACAAGACTTTCTGTGATTGCAAGTAAGTGTTTCTAGCCATCCTTGATTTTGATCAGCAATGGCTTCTTCCCTTGAATTATTTTTCAGTGTACCTAGAATGCTTTTGCC
# other designations are possible
>TRDV2*02_0/GGACCCTTTT/0_TRDD3*01__TRD+
ATACCGAGAAAAGGACATCTATGGCCCTGGTTTCAAAGACAATTTCCAAGGTGACATTGATATTGCAAAGAACCTGGCTGTACTTAAGATACTTGCACCATCAGAGAGAGATGAAGGGTCTTACTACTGTGCCTGTGACAGGACCCTTTTACTGGGGGATACGCACAGTGCTACAAAACCTACAGAGACCTGTACAAAAACTGCAGGGGCAAAAGTGCCATTTCCCTGGGATATCCTCACCCTGGGTCCCA
>TRDD2*01_1/AGG/1_TRDD3*01__TRD+
AGCGGGTGGTGATGGCAAAGTGCCAAGGAAAGGGAAAAAGGAAGAAGAGGGTTTTTATACTGATGTGTTTCATTGTGCCTTCCTA
AGG
CTGGGGGATACGCACAGTGCTACAAAACCTACAGAGACCTGTACAAAAACTGCAGGGGCAAAAGTGCCATTTCCCTGGGATATCCTCACCCTGGGTCCCA
>TRGV5*01_5/GGGCCAG/2_TRGJ1*02__TRG
CGTCTTCTGTACTATGACGTCTCCAACTCAAAGGATGTGTTGGAATCAGGACTCAGTCCAGGAAAGTATTATACTCATACACCCAGGAGGTGGAGCTGGATATTGATACTACGAAATCTAATTGAAAATGATTCTGGGGTCTATTACTGTGCCACCTGGGGGGCCAGATTATAAGAAACTCTTTGGCAGTGGAACAACAC
>1/TGAGGCGGAGAGATCGGGGG/5_IGHD2-15*01_1/AACGGTAAGT/5_IGHJ5*02__IGH
GGGGGAGGCTTGGTACAGCCTGGGGGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTCAGTAGCTACGACATGCACTGGGTCCGCCAAGCTACAGGAAAAGGTCTGGAGTGGGTCTCAGCTATTGGTACTGCTGGTGACACATACTATCCAGGCTCCGTGAAGGGCCGATTCACCATCTCCAGAGAAAATGCCAAGAACTCCTTGTATCTTCAAATGAACAGCCTGAGAGCCGGGGACACGGCTGTGTATTACTGTGCAAGAGTGAGGCGGAGAGATCGGGGGATTGTAGTGGTGGTAGCTGCTACTCAACGGTAAGTTGGTTCGACCCCTGGGGCCAGGGAACCCTGGTCACCGTCTCCTCAGGT
# or IGHV3-74*01 (-9)
>IGHV3-74*02_7/CCGCGGT/6_IGHD3-9*01_4/CTTCGAACA/7_IGHJ4*02__IGH
GGAGTCGGGGGGAGGCTTAGTTCAGCCTGGGGGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTCAGTAGCTACTGGATGCACTGGGTCCGCCAAGCTCCAGGGAAGGGGCTGGTGTGGGTCTCACGTATTAATAGTGATGGGAGTAGCACAAGCTACGCGGACTCCGTGAAGGGCCGATTCACCATCTCCAGAGACAACGCCAAGAACACGCTGTATCTGCAAATGAACAGTCTGAGAGCCGAGGACACGGCTGTGTATTACTGCCGCGGTCGATATTTTGACTGGTTATTACTTCGAACATGACTACTGGGGCCAGGGAACCCTGGTCACCGTCTCCTCAGGT
>___UNSEG
>x__UNSEG
GGTAGTAGCAAATATTCAAACGAGAACTTTGAAGGCCGAAGTGGAGAAGGCTTCCATGTGAACAGCAGTTGAACATGGGTCAGTCGGTCCTGAGAGA
>seq-317-1__UNSEG
......
......@@ -22,6 +22,7 @@ if sys.version_info < PY_REQUIRED:
sys.exit(1)
from subprocess import Popen, PIPE, STDOUT
from collections import defaultdict
import os
import argparse
......@@ -51,6 +52,8 @@ if args.after_two:
global_failed = False
global_stats = defaultdict(int)
global_stats_failed = defaultdict(int)
def fasta_id_lines_from_program(f_should):
f_log = f_should + PROG_TAG + LOG_SUFFIX
......@@ -88,19 +91,27 @@ def id_line_to_tap(l, tap_id):
# We could have something that allows some regexp (still allowing * and + without escaping)
should_pattern = should.replace('_', ' ')
if ' ' in should_pattern:
locus = should_pattern.split(' ')[1]
else:
locus = None
if args.after_two:
# Testing only the locus code
if ' ' in should_pattern:
should_pattern = should_pattern.split(' ')[1]
if locus:
should_pattern = locus
else:
return '# %d - not tested (no locus)' % tap_id
globals()['global_stats'][locus] += 1
tap = ''
should_not_found = (not should_pattern in result) \
or (should_pattern + ' UNSEG' in result)
if should_not_found:
globals()['global_failed'] = True
globals()['global_stats_failed'][locus] += 1
tap += 'not '
tap += 'ok %d - %s' % (tap_id, should_pattern)
......@@ -147,5 +158,12 @@ if __name__ == '__main__':
should_to_tap_one_file(f_should_rc)
print
print "=== Summary, should-vdj tests ==="
print " tested failed"
for locus in sorted(global_stats):
print " %-5s %4d %4d" % (locus, global_stats[locus], global_stats_failed[locus])
print " ===== %4d %4d" % (sum(global_stats.values()), sum(global_stats_failed.values()))
print
if global_failed:
sys.exit(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