Commit 24acd18e authored by Mikaël Salson's avatar Mikaël Salson

Merge branch 'feature-a/test-should-directives' into 'dev'

update should.py, streamlined placement of directives, EXIT_CODEs

See merge request !669
parents 9ad3f80f d33b38f6
Pipeline #160286 passed with stages
in 8 minutes and 26 seconds
!NO_LAUNCHER:
!LAUNCH: valgrind --suppressions=gzstream_cpp.supp --suppressions=libstdc++_leak.supp --leak-check=full $VIDJIL_DIR/$EXEC --clean-memory -c clones -d -g ../../../germline/homo-sapiens.g:IGH -z 2 -r 1 bug20141024.fa 2>&1
!REQUIRES: which valgrind
!LAUNCH: valgrind --suppressions=gzstream_cpp.supp --suppressions=libstdc++_leak.supp --leak-check=full $VIDJIL_DIR/$EXEC --clean-memory -c clones -d -g ../../../germline/homo-sapiens.g:IGH -z 2 -r 1 bug20141024.fa 2>&1
$ No invalid read with short sequences
e1:ERROR SUMMARY: 0 errors from 0 contexts
......
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline -r 1 -1 -2 -K bug4225-j.fa
!OUTPUT_FILE: out/bug4225-j.affects
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline -r 1 -1 -2 -K bug4225-j.fa
$ Find only +k and ? affects before the stretch of _ for all loci
16: seed .*(\+k| \?){28}( _)+$
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline -r 1 -4 -K ../data/chimera-fake-half.fa
!OUTPUT_FILE: out/chimera-fake-half.affects
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline -r 1 -4 -K ../data/chimera-fake-half.fa
$ Find only +B and ? affects on the TRB and unexpected lines
2: seed .* _(\+B| \?){48} _
!REQUIRES: python $VIDJIL_DIR/tools/check_python_version.py
!LAUNCH: $VIDJIL_DIR/$EXEC -x 100 -r 1 -z 5 -w 60 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta ; python $VIDJIL_DIR/tools/vidjil-to-fasta.py -o out/S22.fasta out/Stanford_S22.vidjil ;
!OUTPUT_FILE: out/S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC -x 100 -r 1 -z 5 -w 60 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta ; python $VIDJIL_DIR/tools/vidjil-to-fasta.py -o out/S22.fasta out/Stanford_S22.vidjil ;
$ 5 representative sequences in the FASTA output file
5:>
!LAUNCH: $VIDJIL_DIR/$EXEC --analysis-cost '1, 2, 3, 4, 5' $VIDJIL_DATA/Stanford_S22.fasta
!EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC --analysis-cost '1, 2, 3, 4, 5' $VIDJIL_DATA/Stanford_S22.fasta
$Check that correct custom cost is used
1:use custom Cost "1, 2, 3, 4, 5"
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/cdr3-stopcodon.fa
!OUTPUT_FILE: out/cdr3-stopcodon.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/cdr3-stopcodon.fa
$ Two identical junctions in JSON
2: "CATWDRKNYYKKLF"
......
!LAUNCH: $VIDJIL_DIR/$EXEC -w 20 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG --consensus-on-longest-sequences $VIDJIL_DATA/test-random-consensus.fa.gz > consensus-longest.log
!LAUNCH: $VIDJIL_DIR/$EXEC -w 20 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/test-random-consensus.fa.gz > consensus-random.log
!NO_LAUNCHER:
!LAUNCH: diff consensus-longest.log consensus-random.log
!EXIT_CODE: 1
!LAUNCH: diff consensus-longest.log consensus-random.log
$ Output should differ: ReadQualityScore gives a consensus of 52bp (with the spurious insertion)
# Appears twice in the header of the consensus sequence and in the similarity matrix
......
!LAUNCH: $VIDJIL_DIR/$EXEC -c segment -aAtl reads 2>&1
!EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC -c segment -aAtl reads 2>&1
$ Deprecated options
5:is deprecated
......
!LAUNCH: $VIDJIL_DIR/$EXEC --hello reads 2>&1
!EXIT_CODE: 109
!LAUNCH: $VIDJIL_DIR/$EXEC --hello reads 2>&1
$ Unknown option
1:error.* --hello
......
!NO_LAUNCHER:
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DATA/Stanford_S22.fasta 2>&1
!EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DATA/Stanford_S22.fasta 2>&1
$ Error, no germlines
1:error.* one germline must be given
......
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline/Makefile $VIDJIL_DATA/Stanford_S22.fasta 2>&1
!EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline/Makefile $VIDJIL_DATA/Stanford_S22.fasta 2>&1
$ Error, incorrect *.g
1:error.* cannot properly read
......
!NO_LAUNCHER:
cd $VIDJIL_DIR
./$EXEC -h | grep '$EXEC -c' | sed 's/X 50/X 5/' | sed 's/demo.LIL-L4/-X 1000 demo\/LIL-L4/' | sh
cd $VIDJIL_DIR ; ./$EXEC -h | grep '$EXEC -c' | sed 's/X 50/X 5/' | sed 's/demo.LIL-L4/-X 1000 demo\/LIL-L4/' > help-examples.sh
cd $VIDJIL_DIR ; sh help-examples.sh
# Test examples embedded in './vidjil-algo -h'
......
......@@ -2,8 +2,8 @@
## Now a productive sequence, with a stop codon after a TRGJ gene
## We now use -J ../TRGJ.fa, see #3147
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -V $VIDJIL_DIR/germline/homo-sapiens/TRGV.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRGJ.fa $VIDJIL_DATA/productive_stop_after_J.fa
!OUTPUT_FILE: out/productive_stop_after_J.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -V $VIDJIL_DIR/germline/homo-sapiens/TRGV.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRGJ.fa $VIDJIL_DATA/productive_stop_after_J.fa
$ Clone name
1: "TRGV9.01 0/CA/0 TRGJP.01"
......
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/productive_stop_before_V.fa
!OUTPUT_FILE: out/productive_stop_before_V.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/productive_stop_before_V.fa
$ first clone name
1: "IGHV1-69.06 2/AACCCCCAACAAAGC/4 IGHD3-3.01 9/CCCATAAGTACCGT/1 IGHJ6.02"
......
!LAUNCH: $LAUNCHER $VIDJIL_DIR/$EXEC -z 1 -k 9 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --ratio 0.001 -r 2 -x 1000 -y 1 -c clones $VIDJIL_DATA/Stanford_S22.fasta | sed 's/--IGH--.*VDJ\\(.*\\).$/\\1/' | sed 's/IGH SEG_./IGH SEG_X/' > vidjil_s22.log
!LAUNCH: $LAUNCHER $VIDJIL_DIR/$EXEC -z 1 -k 9 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --ratio 0.001 -r 2 -x 1000 -y 1 -c clones $VIDJIL_DATA/Stanford_S22.rc.fasta | sed 's/--IGH--.*VDJ\\(.*\\).$/\\1/' | sed 's/IGH SEG_./IGH SEG_X/' > vidjil_s22_rc.log
!LAUNCH: diff out/Stanford_S22{,.rc}.vidjil | grep GGG && diff vidjil_s22.log vidjil_s22_rc.log
!EXIT_CODE: 1
!LAUNCH: diff out/Stanford_S22{,.rc}.vidjil | grep GGG && diff vidjil_s22.log vidjil_s22_rc.log
$ Same number detected
0:==> detected
......
......@@ -18,8 +18,8 @@ $ There is a warning on multiple candidate assignations
$ The warning is also found on stdout
1:\[warning\] \(W69\) Several genes with equal probability
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -g $VIDJIL_DIR/germline/homo-sapiens.g:TRB $VIDJIL_DATA/trb-only-VJ.fa
!OUTPUT_FILE: out/trb-only-VJ.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -g $VIDJIL_DIR/germline/homo-sapiens.g:TRB $VIDJIL_DATA/trb-only-VJ.fa
$ With -c designation, the recombination is properly designated, without any D
1:"name": "TRBJ2-3.01"
......
!LAUNCH: $VIDJIL_DIR/$EXEC -x 1 -w -10 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta 2>&1
!EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC -x 1 -w -10 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta 2>&1
$ Error, too small -w
1:error.* Too small -w
!LAUNCH: $VIDJIL_DIR/$EXEC -x 100 -r 1 -y 1 -z 0 -w 10 --out-clone-files -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta 2>&1
!OUTPUT_FILE: out/seq/clone.fa-1
### !EXIT_CODE: 1
!LAUNCH: $VIDJIL_DIR/$EXEC -x 100 -r 1 -y 1 -z 0 -w 10 --out-clone-files -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta 2>&1
$ We should find a window
1:[ACGT]{10}
This diff is collapsed.
TMP_DEFS=`tempfile`
# Not satisfactory
cp ../../defs.py $TMP_DEFS
cp ../../defs.py defs.py.tmp
echo "PRE_PROCESS_DIR='tests/data/pre_process'" >> ../../defs.py
python3 ../../fuse.py $FUSE_OPTIONS --pre igh-to-trg.sh ../../../algo/tests/data/results-two-clones-1-2.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil; cat fused.vidjil
mv $TMP_DEFS ../../defs.py
mv defs.py.tmp ../../defs.py
cat fused.vidjil
......
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