Commit 6cbd3d5a authored by flothoni's avatar flothoni

Merge branch 'dev' of gitlab.inria.fr:vidjil/vidjil into feature-sc/1469-get-reads

parents 2708bb55 e9a82bd8
Pipeline #67864 failed with stages
in 7 minutes and 13 seconds
......@@ -223,7 +223,7 @@ test_browser-functional:
- make -C browser
- source /etc/profile.d/rvm.sh
- rvm use 2.6.1
- HEADLESS=1 make -C browser/test functional
- HEADLESS=1 make -C browser/test functional BROWSERS=--browsers-from-file
artifacts:
paths:
- browser/
......
# Becomes ../Makefile in a release
# algo/Makefile.algo (git)
# /Makefile (in a release)
.PHONY: all germline vidjil-algo demo test
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......@@ -361,7 +361,7 @@ string Segmenter::getInfoLine() const
{
string s = "" ;
s += (segmented ? "" : "! ") + info ;
s += (segmented ? "" : "\t ! ") + info ;
s += " " + info_extra ;
s += " " + segmented_germline->code ;
s += " " + string(segmented_mesg[because]) ;
......
/*
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-2017 by Bonsai bioinformatics
Copyright (C) 2011-2019 by VidjilNet consortium and Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
......
......@@ -23,6 +23,9 @@ VALGRIND_TOOLS= --tool=memcheck --leak-check=full --show-reachable=yes --trace-c
VALGRIND_OUTPUT_XML=--xml=yes --xml-file='$(REPORTS_PATH)/valgrind.xml.%p'
VALGRIND_OUTPUT=--error-exitcode=1
SHOULD_TIMEOUT=140
SHOULD_TIMEOUT_VALGRIND=300
ifeq ($(XML_OUTPUT), 1)
VALGRIND_OUTPUT=$(VALGRIND_OUTPUT_XML)
endif
......@@ -71,7 +74,7 @@ snapshot_diff_current:
should: vidjil
time python3 should.py --xml $(SHOULD)
time python3 should.py --timeout $(SHOULD_TIMEOUT) --xml $(SHOULD)
shouldvdj_if_python:
if python ../../tools/check_python_version.py ; \
......@@ -122,7 +125,7 @@ curated-vdj.zip: $(SHOULD_VDJ_ARCHIVE)
valgrind_should: vidjil
$(MAKE) -C "$(REPORTS_PATH)" clean_valgrind
time python3 should.py --timeout 300 --launcher "$(VALGRIND_CMD)" --extra=--clean-memory $(SHOULD)
time python3 should.py --timeout $(SHOULD_TIMEOUT_VALGRIND) --launcher "$(VALGRIND_CMD)" --extra=--clean-memory $(SHOULD)
valgrind_%:
LAUNCHER="$(VALGRIND_CMD)" $(MAKE) $(patsubst valgrind_%,%,$@)
......
!LAUNCH: $VIDJIL_DIR/$EXEC -c segment -g ../../../germline/homo-sapiens.g:IGH bug20131218.fa
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations -g ../../../germline/homo-sapiens.g:IGH bug20131218.fa
# The number of deletions in the D is larger than the D length itself.
$ Bug with the number of deletions in the D.
......
!LAUNCH: $VIDJIL_DIR/$EXEC -KA -k 16 -z 0 -g ../../../germline/homo-sapiens.g:IGH bug20150604.fa
!LAUNCH: $VIDJIL_DIR/$EXEC -K --all -k 16 -z 0 -g ../../../germline/homo-sapiens.g:IGH bug20150604.fa
$ Bug on some architectures, not segmented
1: junction detected in 1 reads
......
!LAUNCH: $VIDJIL_DIR/$EXEC -s '#####-#####' -c clones -r 1 -g ../../../germline/homo-sapiens.g:IGH -t 0 -e 1e-2 bug20160121.fa
!LAUNCH: $VIDJIL_DIR/$EXEC -s '#####-#####' -c clones -r 1 -g ../../../germline/homo-sapiens.g:IGH -e 1e-2 bug20160121.fa
$ Sequences should not be segmented since they only contain J.
1:UNSEG only J/3' -> 2
!LAUNCH: $VIDJIL_DIR/$EXEC -E 1 -d -g $VIDJIL_DIR/germline -c segment bug2249.fa
!LAUNCH: $VIDJIL_DIR/$EXEC -E 1 -d -g $VIDJIL_DIR/germline -c designations bug2249.fa
$ Should not have a TRDD2 (length 9) with 8 deletions (first seq)
f0:7 TRDD2.01 1
......
>lcl|FLN1FA002RWEZA.1|
ggctggagtgggtttcatacattagtagtaatagtggtgccatatactacgcagactctgtgaagggccgattcaccatc
tccagaaacaatgccaaggactcactgtatctgcaaatgaacagcctgagagccgaggacacggctgtgtattactgtgc
gagagcgatcccccggtattactatgatactagtggcccaaacgactactggggccagggaaccctggtcaccgtctcct
cag
>unsegmented
CGAATGCCTACATAGGGCTGGACGGCGTGCGTATTCCGTTACTACGACGATTCAAGGTAGTACAGCAAGACCACTGACCACTCCCGTGAGATATTTACCGAACGCCATTACGTATTGACACCGCAGTAATGACCTGGGTGGGGCATAGTCAAATTTCTGATGCTGGATAGTTTAATCCGCAGAGATTTTGTACTTGGCGATTGCTACACGATGTGTAGTAAATGATGAATATTCATAATCACCTTTCTGTGCCGATGGCATAGGGGGACCAATACCTCTGTTCGATGAACTAAGCTGGGA
>unexpected-IGHV-TRGJ
ATCTGCAAATGAACAGCCTGAGAGCCGAGGACACGGCTGTGTATTACTGTGCGAGAG
CGATCCCCCGGTATTACTATGATACTAGTGGCCCAAAC
atagtagtgattggatcaagacgtttgcaaaagggactaggctcatagtaacttcgcctg
\ No newline at end of file
......@@ -250,7 +250,7 @@ def header_igblast_results(ff_fasta, ff_igblast):
### Vidjil
VIDJIL_FINE = '{directory}/vidjil-algo --header-sep "#" -c segment -2 -3 -d -g {directory}/germline/homo-sapiens.g %s >> %s'
VIDJIL_FINE = '{directory}/vidjil-algo --header-sep "#" -c designations -2 -3 -d -g {directory}/germline/homo-sapiens.g %s >> %s'
VIDJIL_KMER = '{directory}/vidjil-algo -w 20 --header-sep "#" -b out -c windows -uuuU -2 -g {directory}/germline/homo-sapiens.g %s > /dev/null ; cat out/out.segmented.vdj.fa out/out.unsegmented.vdj.fa >> %s'
def should_results_from_vidjil_output(f_log):
......@@ -267,9 +267,15 @@ def should_results_from_vidjil_output(f_log):
if l[0] == '>':
l = l.strip()
pos = l.find(' + ') if ' + ' in l else l.find(' - ')
if pos == -1:
pos = l.find(' ! ')
if pos == -1:
raise ValueError("No [+-!] in the line: {}".format(l))
should = l[1:pos].replace('_', ' ')
pos = l.find('\t')
if pos == -1:
raise ValueError("I expected a tabulation to separate the sequence name from the remainder")
result = l[pos+1:] + ' '
yield (should, result)
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/3344-bad-filtering.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/3344-bad-filtering.fa
$ Check that proper filtering is used
1: IGHV4-31.02
!REQUIRES: python $VIDJIL_DIR/tools/check_python_version.py
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --alternative-genes 3 -c segment -x 1 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta > /dev/null ; cat out/Stanford_S22.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --alternative-genes 3 -c designations -x 1 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta > /dev/null ; cat out/Stanford_S22.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
$ Presence of alternative:
1: "3alt"
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -c clones -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/test_representatives.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -c clones -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/test_representatives.fa
$ Three clones should be found
1:3 clones
......
!LAUNCH: $VIDJIL_DIR/$EXEC -a -g $VIDJIL_DIR/germline/homo-sapiens-cd.g -A $VIDJIL_DATA/cd-19-trimmed.fa
!LAUNCH: $VIDJIL_DIR/$EXEC --all --out-reads -g $VIDJIL_DIR/germline/homo-sapiens-cd.g $VIDJIL_DATA/cd-19-trimmed.fa
$ Load CD-sorting.fa
1:homo-sapiens/CD-sorting.fa .* 28 sequences
......
!LAUNCH: $VIDJIL_DIR/$EXEC -K -g $VIDJIL_DIR/germline/homo-sapiens-cd.g -A $VIDJIL_DATA/cd-4-19.fa ; grep 'seed' out/cd-4-19.affects
!LAUNCH: $VIDJIL_DIR/$EXEC -K -g $VIDJIL_DIR/germline/homo-sapiens-cd.g --all $VIDJIL_DATA/cd-4-19.fa ; grep 'seed' out/cd-4-19.affects
$ Load CD-sorting.fa
1:homo-sapiens/CD-sorting.fa .* 28 sequences
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/cdr3-stopcodon.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -3 -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/cdr3-stopcodon.fa
!OUTPUT_FILE: out/cdr3-stopcodon.vidjil
$ Two identical junctions in JSON
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -3 -E 1.0 -g $VIDJIL_DIR/germline ../should-vdj-tests/Demo-X5.should-vdj.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -3 -E 1.0 -g $VIDJIL_DIR/germline ../should-vdj-tests/Demo-X5.should-vdj.fa
$ Detects a CDR3 on regular V(D)J recombinations
1: IGH SEG.* [{].*[}]
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline -A -2 $VIDJIL_DATA/2549.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline --all -2 $VIDJIL_DATA/2549.fa
$ The KmerSegmenter segments the chimera on xxx germline (-2)
1:unexpected .* -> .* 1
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -t 0 -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake.fa
$ The KmerSegmenter segments the three chimera reads on PSEUDO_MAX12 germline (-2)
1:unexpected .* -> .* 3
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake-D.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake-D.fa
$ The KmerSegmenter segments the chimera reads on PSEUDO_MAX12 germline (-2)
f1:unexpected .* -> .* 2
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DATA/chimera-fake-VJ-trim.g $VIDJIL_DATA/chimera-fake-VJ.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DATA/chimera-fake-VJ-trim.g $VIDJIL_DATA/chimera-fake-VJ.fa
# Testing a custom (fake) .g with special parameters for the algorithm
$ The KmerSegmenter segments no read in Y because of the parameter
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DATA/chimera-fake-VJ.g $VIDJIL_DATA/chimera-fake-VJ.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DATA/chimera-fake-VJ.g $VIDJIL_DATA/chimera-fake-VJ.fa
# Testing a custom (fake) germlines.data
$ Report the species
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake-VJ.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline -2 $VIDJIL_DATA/chimera-fake-VJ.fa
$ The KmerSegmenter segments the five chimera reads on PSEUDO_MAX12 germline (-2)
1:unexpected .* -> .* 5
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -e 100 -A -t 0 -g $VIDJIL_DIR/germline -4 $VIDJIL_DATA/chimera-fake-half.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -e 100 --all -g $VIDJIL_DIR/germline -4 $VIDJIL_DATA/chimera-fake-half.fa
# TODO: a more precise modeling should give a e-value computation that could make this work even with -e 1
$ The KmerSegmenter segments the six chimera reads on PSEUDO_MAX1U germline (-4)
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -uU -g $VIDJIL_DIR/germline $VIDJIL_DATA/chimera-trg.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -uU -g $VIDJIL_DIR/germline $VIDJIL_DATA/chimera-trg.fa
$ Do not segment on IG/TR by chance
12:(IG|TR).* -> .* 0
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g -c clones -A -3 $VIDJIL_DATA/segment_lec.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g -c clones --all -3 $VIDJIL_DATA/segment_lec.fa
$ Extract up to 50bp windows (TRG)
1:windows up to 50bp
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -k 14 -w 50 -c clones -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa -y 3 -z 0 -r 1 -n 5 $VIDJIL_DATA/clones_simul.fa ; cat out/clones_simul.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -k 14 -w 50 -c clones -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa -y 3 -z 0 -r 1 --cluster-epsilon 5 $VIDJIL_DATA/clones_simul.fa ; cat out/clones_simul.vidjil
$ Window extractions
1:windows up to 50bp
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -KA -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH+ -r 4 -b co $VIDJIL_DATA/D7-27--J1.fa ; cat out/co.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -K --all -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH+ -r 4 -b co $VIDJIL_DATA/D7-27--J1.fa ; cat out/co.vidjil
# Test D7-27 0/92/0 J1 non-recombination
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -x 2000 -t 0 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -FaW GAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACT $VIDJIL_DATA/Stanford_S22.fasta ; cat out/seq/clone.fa-1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -x 2000 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --grep-reads GAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACT $VIDJIL_DATA/Stanford_S22.fasta ; cat out/seq/clone.fa-1
# See also label-grep-reads.should-get
$ Keep only one windows, the one given by -W, with only 2 reads in the first 2000 reads (it is actually the second clone in Stanford_S22.fasta)
1: keep 1 windows in 2 reads
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -KA -z 0 -s 10s -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa -D $VIDJIL_DIR/germline/homo-sapiens/IGHD.fa $VIDJIL_DATA/common-V-D.fa ; cat out/common-V-D.affects
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -K --all -z 0 -s 10s -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa -D $VIDJIL_DIR/germline/homo-sapiens/IGHD.fa $VIDJIL_DATA/common-V-D.fa ; cat out/common-V-D.affects
$ Segments the sequence
1: SEG .* -> .* 1
......
......@@ -12,7 +12,7 @@
# '-c windows'
0:Extracting windows
# '-c segment', one time
# '-c designations', one time
1:Segmenting V.D.J
# '-c germlines'
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -aAtl reads 2>&1
!EXIT_CODE: 1
$ Deprecated options
5:is deprecated
$ Advice on usage
1:-c designations
1:--trim
1:--all
1:--label
1:--out-reads
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --hello reads 2>&1
!EXIT_CODE: 109
$ Unknown option
1:error.* --hello
$ Refer to online help and documentation
1:run with --help
1:see doc/vidjil-algo.md
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -3 -c segment -g $VIDJIL_DIR/germline/mus-musculus.g $VIDJIL_DATA/example_mouse.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -3 -c designations -g $VIDJIL_DIR/germline/mus-musculus.g $VIDJIL_DATA/example_mouse.fa
$ Segment sequence on IGK
1:segIGK.*IGKV.*IGKJ
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -Z 10 -A -x 30 -v -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --analysis-filter 10 --all -x 30 -v -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta
$ Clone 13 is correctly analyzed
1:FLN1FA001EP9M2.* IGHV2-26.* 2/GAT.*GCC/8 IGHJ2
$ Statistics on -Z
1:Statistics on clone analysis
rb1: IGH 3[0-2][0-9]{2}/ 1[0-2][0-9]{3} 28..%
rb1: IGH 3[0-2][0-9]{2}/ 1[0-2][0-9]{3} 28..%
\ No newline at end of file
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -x 2000 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --out-reads --label-filter --label GAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACT $VIDJIL_DATA/Stanford_S22.fasta ; cat out/seq/clone.fa-1
# See also combo-grep-reads.should-get
$ Keep only one windows, the one given by -W, with only 2 reads in the first 2000 reads (it is actually the second clone in Stanford_S22.fasta)
1: keep 1 windows in 2 reads
$ Tbere are the three IGHV/D/J genes in out/seq/clone.fa-1
3:>IGH
$ There are 2 reads in out/seq/clone.fa-1
2:>lcl
!LAUNCH: $VIDJIL_DIR/$EXEC -c segment $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH,IGK,IGL $VIDJIL_DATA/multi-complete.fa ; cat out/multi-complete.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
!LAUNCH: $VIDJIL_DIR/$EXEC -c designations $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH,IGK,IGL $VIDJIL_DATA/multi-complete.fa ; cat out/multi-complete.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
$ Segment the Ig recombinations
1:IGH SEG
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -g $VIDJIL_DIR/germline $VIDJIL_DATA/multi-tiny.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -g $VIDJIL_DIR/germline $VIDJIL_DATA/multi-tiny.fa
$ Do not segment any of the seven reads
7:UNSEG
......
# The sequences are on TRG, no CDR3 should be found with IGH
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -3 -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -D $VIDJIL_DIR/germline/homo-sapiens/IGHD.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa ../should-vdj-tests/cdr3-indels.should-vdj.fa; cat out/cdr3-indels.should-vdj.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -3 -V $VIDJIL_DIR/germline/homo-sapiens/IGHV.fa -D $VIDJIL_DIR/germline/homo-sapiens/IGHD.fa -J $VIDJIL_DIR/germline/homo-sapiens/IGHJ.fa ../should-vdj-tests/cdr3-indels.should-vdj.fa; cat out/cdr3-indels.should-vdj.vidjil
$ No CDR3 should be found
0:TRGV.* [{].*[}]
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -3 -g $VIDJIL_DIR/germline $VIDJIL_DATA/no-cdr3.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -3 -g $VIDJIL_DIR/germline $VIDJIL_DATA/no-cdr3.fa
$ No CDR3 should be found
0:seq1.* IGH SEG.* [{].*[}]
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -A $VIDJIL_DATA/overlap-d-j.fa | grep -v out | tail -4 | tr -d '\n' | wc -c
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --all $VIDJIL_DATA/overlap-d-j.fa | grep -v out | tail -4 | tr -d '\n' | wc -c
$ Exported sequence has all the bases
1:116
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c clones -A -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG -A $VIDJIL_DATA/segment_lec.fq > /dev/null ; cat out/segment_lec.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c clones --all -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG $VIDJIL_DATA/segment_lec.fq > /dev/null ; cat out/segment_lec.vidjil
$ Window
1:"id": "GGGGTCTATTACTGTGCCACCTGGGCCTTATTATAAGAAACTCTTTGGCA"
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG ../should-vdj-tests/ext-nucleotides-N.should-vdj.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline/homo-sapiens.g:TRG ../should-vdj-tests/ext-nucleotides-N.should-vdj.fa
$ Segments on TRG
1: TRG .* -> .* 1
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -c segment $VIDJIL_DATA/segment_S22.fa | grep '^>' ; cat out/segment_S22.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -c designations $VIDJIL_DATA/segment_S22.fa | grep '^>' ; cat out/segment_S22.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
$ First sequence Stanford
# 164 175 195 203
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -v -g $VIDJIL_DIR/germline -c segment $VIDJIL_DATA/segment_simul.fa | grep '^[>#]'
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -v -g $VIDJIL_DIR/germline -c designations $VIDJIL_DATA/segment_simul.fa | grep '^[>#]'
$ First sequence, easy segmentation (no error, few deletions at the windows, small N)
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -e 10 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -W ACCGGTATTACT -W CAGCTGCTCCCC -W TGGGCCACTC -W ATCAACGCTGGCAATGGTAACACTAAATATTCACAGAAGTTCCAGGGCAGAGTCACCATTACCAGGGACACATACGCGAGCACAGCCTACATGGAGCTGAGCAGCCTGAGATCTGAAGACACGGCTCTGTATTACTGTGCGAGAGTGCGCAGCAGCTGGTCTGATGCTTTTGATTATCTGG $VIDJIL_DATA/clones_simul.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -e 10 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH --label ACCGGTATTACT --label CAGCTGCTCCCC --label TGGGCCACTC --label ATCAACGCTGGCAATGGTAACACTAAATATTCACAGAAGTTCCAGGGCAGAGTCACCATTACCAGGGACACATACGCGAGCACAGCCTACATGGAGCTGAGCAGCCTGAGATCTGAAGACACGGCTCTGTATTACTGTGCGAGAGTGCGCAGCAGCTGGTCTGATGCTTTTGATTATCTGG $VIDJIL_DATA/clones_simul.fa
$ ACCGGTATTACT is found (in window and representative and in the command line)
3:ACCGGTATTACT
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -w all -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/s-somatic.fa ; cat out/s-somatic.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -w all -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/s-somatic.fa ; cat out/s-somatic.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
$ No clustering due to -w all
1: considering all analyzed reads as windows
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -z 2 -r 5 -a -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta ; cat out/seq/clone.fa-2
# Testing detailed clone output (-a)
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -z 2 -r 5 --out-reads -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta ; cat out/seq/clone.fa-2
# Testing detailed clone output (--out-reads)
$ Detailed clone output (out/seq/clone.fa-2), germline
# IGHV1-8*01 could also be detected
......
!LAUNCH: ($LAUNCHER $VIDJIL_DIR/$EXEC $EXTRA $VIDJIL_DEFAULT_OPTIONS -c germlines -g $VIDJIL_DIR/germline/homo-sapiens.g:TRA,TRB,TRD,TRG,IGH,IGK,IGL -t 100 -s '######-######' $VIDJIL_DATA/Stanford_S22.fasta)
!LAUNCH: ($LAUNCHER $VIDJIL_DIR/$EXEC $EXTRA $VIDJIL_DEFAULT_OPTIONS -c germlines -g $VIDJIL_DIR/germline/homo-sapiens.g:TRA,TRB,TRD,TRG,IGH,IGK,IGL --trim 100 -s '######-######' $VIDJIL_DATA/Stanford_S22.fasta)
$ number of reads and kmers
1:13153 reads, 3020179 kmers
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -x 100 -z 0 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -r 5 -W ACTGTGCGAGAGTTGGAATTAGTAGTGGCTGGCCTGATTCCTGGGGCCAG $VIDJIL_DATA/Stanford_S22.fasta ; cat out/Stanford_S22.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -x 100 -z 0 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -r 5 --label ACTGTGCGAGAGTTGGAATTAGTAGTGGCTGGCCTGATTCCTGGGGCCAG $VIDJIL_DATA/Stanford_S22.fasta ; cat out/Stanford_S22.vidjil
$ Some clone has only one read, bypassing the -r 5 option, and the good label
1: clone-00..*0001-.* -W
1: clone-00..*0001-.* --label
$ The label appears in the json output
1: "label": "-W"
1: "label": "--label"
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -z 0 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -x 100 -r 5 -l $VIDJIL_DATA/Stanford_S22.label $VIDJIL_DATA/Stanford_S22.fasta ; cat out/Stanford_S22.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -z 0 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -x 100 -r 5 --label-file $VIDJIL_DATA/Stanford_S22.label $VIDJIL_DATA/Stanford_S22.fasta ; cat out/Stanford_S22.vidjil
$ Some clone has only one read, bypassing the -r 5 option, and the good label
1: clone-00..*0001-.* my-clone
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -y 0 -g $VIDJIL_DIR/germline/homo-sapiens-cd.g $VIDJIL_DATA/Stanford_S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -e 1e-2 -y 0 -g $VIDJIL_DIR/germline/homo-sapiens-cd.g $VIDJIL_DATA/Stanford_S22.fasta
$ Do not segment any read with SEG_METHOD_ONE on homo-sapiens-cd.g
1: CD .* -> .* 0 .* 0
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -x 2 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -x 2 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/Stanford_S22.fasta
$ Segments the good number of sequences in Stanford S22
2: >lcl
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -y 0 -t 1 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -x 100 $VIDJIL_DATA/Stanford_S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -y 0 --trim 1 -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH -x 100 $VIDJIL_DATA/Stanford_S22.fasta
$ No read segmented as we have no germline because of the -t
$ No read segmented as we have no germline because of the --trim
1: UNSEG too few V/J -> 100
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -2 -c designations -g $VIDJIL_DIR/germline $VIDJIL_DATA/segment-or-not.fa
$ Check that output has one tab for each sequence
3:^>.*\t
\ No newline at end of file
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline/homo-sapiens.g:TRB $VIDJIL_DATA/trb-only-VJ.fa ; cat out/trb-only-VJ.vidjil
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline/homo-sapiens.g:TRB $VIDJIL_DATA/trb-only-VJ.fa ; cat out/trb-only-VJ.vidjil
$ Segments the read on TRB (the information is given twice, stdout + .vidjil)
2: TRB .* -> .* 1
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline/homo-sapiens.g:TRD $VIDJIL_DATA/trd-dd2-dd3.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline/homo-sapiens.g:TRD $VIDJIL_DATA/trd-dd2-dd3.fa
$ Segment only 2 reads, because we do not look for incomplete recombinations
1:junction detected in 2 reads
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -w 10 -e 10 -A -g $VIDJIL_DIR/germline $VIDJIL_DATA/trd-dd2-dd3.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -w 10 -e 10 --all -g $VIDJIL_DIR/germline $VIDJIL_DATA/trd-dd2-dd3.fa
$ Segment 6 reads, thanks to -i
1:junction detected in 6 reads
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -K -A -e 10 -k 8 -w 20 -V $VIDJIL_DIR/germline/homo-sapiens/TRDV.fa -V $VIDJIL_DIR/germline/homo-sapiens/TRDD2+up.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRDD3+down.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRDJ.fa $VIDJIL_DATA/trd-dd2-dd3.fa ; cat out/trd-dd2-dd3.affects
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -K --all -e 10 -k 8 -w 20 -V $VIDJIL_DIR/germline/homo-sapiens/TRDV.fa -V $VIDJIL_DIR/germline/homo-sapiens/TRDD2+up.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRDD3+down.fa -J $VIDJIL_DIR/germline/homo-sapiens/TRDJ.fa $VIDJIL_DATA/trd-dd2-dd3.fa ; cat out/trd-dd2-dd3.affects
$ Segment all 8 reads, thanks to TRDD2 and TRDD3
1: junction detected in 8 reads .100..
......
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -f '1, 2, 3, 4, 5' $VIDJIL_DATA/Stanford_S22.fasta
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --analysis-cost '1, 2, 3, 4, 5' $VIDJIL_DATA/Stanford_S22.fasta
!EXIT_CODE: 1
$Check that correct custom cost is used
......
......@@ -5,6 +5,9 @@
$ Error, no germlines
1:error.* one germline must be given
$ Refer to documentation
1:see doc/vidjil-algo.md
......
......@@ -14,7 +14,7 @@ cd $VIDJIL_DIR
# '-c windows'
1:Extracting windows
# '-c segment'
# '-c designations'
1:Segmenting V.D.J
# '-c germlines'
......
......@@ -5,7 +5,7 @@ $ License
1:vidjil-algo is free software
$ Check default costs
1:segmenter .* "4, -6, -10, -1, -10"
1:analysis.* "4, -6, -10, -1, -10"
1:clustering .* "1, -4, -4, 0, 0"
$ Show seeds
......@@ -17,4 +17,4 @@ $ Display advanced options
: custom Cost
$ Correct number of options
B50:^ -
B52:^ -
......@@ -7,12 +7,12 @@ $ License
$ Check default filtering options
1: =5 .* minimal number of reads supporting a clone
1: =0 .* minimal percentage of reads supporting a clone
1: =100 .* maximal number of clones computed with a consensus sequence
1: =100 .* maximal number of clones to be analyzed
1: =100 .*maximal number of clones computed with a consensus sequence
1: max-designations .*=100
$ Do not display advanced options
0: , experimental options
0: custom Cost
$ Correct number of regular options
B25:^ -
B24:^ -
......@@ -5,4 +5,4 @@ $ Warning, -z
1:WARNING
$ Link to documentation
1:vidjil-algo.md
2:vidjil-algo.md
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -A -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/toy_V.fa ; cat out/toy_V.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS --all -g $VIDJIL_DIR/germline/homo-sapiens.g:IGH $VIDJIL_DATA/toy_V.fa ; cat out/toy_V.vidjil | python $VIDJIL_DIR/tools/format_json.py -1
$ Warning, -A
$ Warning, --all
1:WARNING
$ Warning in json output
1: "code": "W20", "level": "warn", "msg": "Very few V.D.J recombinations found: 0.00."
$ Link to documentation
1:vidjil-algo.md
3:vidjil-algo.md
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c segment -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/what-V.fa
!LAUNCH: $VIDJIL_DIR/$EXEC $VIDJIL_DEFAULT_OPTIONS -c designations -g $VIDJIL_DIR/germline/homo-sapiens.g $VIDJIL_DATA/what-V.fa
$ V1*01 is recognized three times
3: VJ .* TRGV1.01
......
......@@ -166,7 +166,11 @@ def should_pattern_to_regex(p):
for term in p.split():
r += process_term(term)
regex_pattern = '.*'.join(r)
if len(r) > 1 and r[1][0] == '|':
# We have an alternative
regex_pattern = '('+' '.join(r)+').*'
else:
regex_pattern = '.*'.join(r)
try:
regex = re.compile(regex_pattern)
......@@ -185,11 +189,65 @@ r_locus = re.compile('\[\S+\]')
def should_result_to_tap(should_pattern, result, tap_id):
'''
Parses (should, result) couples such as:
'TRDD2*01 1/AGG/1 TRDD3*01 TRD+', 'TRDD2*01 1/AGG/1 TRDD3*01 TRD+'
or
'TRDV3*01 0//0 TRDJ4*01, 'TRD UNSEG noisy'
and return a .tap line
Returns a .tap line asserting whether 'should_pattern' is found in 'result'
Looks at several 'args' options.
Fills some global variables.