Commit 3c6db6fc authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud

germline/tests: Test split-from-imgt.py

We use this for reorganizing where tests are launched
parent 75a201e3
......@@ -45,7 +45,7 @@ test_germlines:
stage: test_germlines
script:
- make -C germline get-all-data
- make -C germline/tests
- make -C germline tests
only:
- /^feature-.*g.*\/.*$/
......
......@@ -30,7 +30,12 @@ diff-from-saved:
echo
diff -r -u -x "*[.][^f][^a]" -x "germline*" -x "get*" -x "Makefile" -x "saved-*" saved-germline/ .
tests:
python split-from-imgt.py --test
make -C tests
distrib: get-all-data js
cd .. ; tar cvzf germline-`cat germline/germline_id`.tar.gz germline/germline_id germline/*/*.fa germline/IMGT_RELEASE browser/js/germline.js
.PHONY: all germline js get-all-data clean diff-from-saved
.PHONY: all germline js get-all-data clean diff-from-saved tests
......@@ -75,7 +75,7 @@ def get_gene_coord(imgt_line):
>>> line = '>X15272|TRGV4*01|Homo sapiens|F|V-REGION|406..705|300 nt|1| | | | |300+0=300| |rev-compl|'
>>> get_gene_coord(line)[0] == 'X15272'
True
>>> get_gene_coord(line)[1] == {'from': 406, 'to': 705, 'imgt_data': 'TRGV4*01|Homo sapiens|F|V-REGION', 'imgt_name': 'TRGV4*01'}
>>> get_gene_coord(line)[1] == {'from': 406, 'to': 705, 'imgt_data': 'TRGV4*01|Homo sapiens|F|V-REGION', 'imgt_name': 'TRGV4*01', 'species': 'Homo sapiens'}
True
'''
elements = imgt_line.split('|')
......@@ -338,6 +338,10 @@ def split_IMGTGENEDBReferenceSequences(f, gene_list):
if __name__ == '__main__':
if sys.argv[1] == '--test':
import doctest
doctest.testmod()
else:
print (IMGT_LICENSE)
ReferenceSequences = sys.argv[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