Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,688
Issues
1,688
List
Boards
Labels
Service Desk
Milestones
Merge Requests
84
Merge Requests
84
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
eedefd37
Commit
eedefd37
authored
Apr 03, 2019
by
Thonier Florian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.inria.fr:vidjil/vidjil into feature-s/3555-erreur-si-clones-null
parents
f11ae76e
1fcf5a1c
Pipeline
#72285
passed with stages
in 9 minutes and 6 seconds
Changes
186
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
186 changed files
with
4691 additions
and
1996 deletions
+4691
-1996
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
Makefile.algo
Makefile.algo
+2
-1
algo/core/affectanalyser.cpp
algo/core/affectanalyser.cpp
+16
-5
algo/core/automaton.hpp
algo/core/automaton.hpp
+7
-7
algo/core/bam.cpp
algo/core/bam.cpp
+1
-1
algo/core/bioreader.cpp
algo/core/bioreader.cpp
+1
-1
algo/core/bioreader.hpp
algo/core/bioreader.hpp
+1
-1
algo/core/cluster-junctions.cpp
algo/core/cluster-junctions.cpp
+1
-1
algo/core/compare-all.cpp
algo/core/compare-all.cpp
+1
-1
algo/core/dynprog.cpp
algo/core/dynprog.cpp
+1
-1
algo/core/fasta.cpp
algo/core/fasta.cpp
+1
-1
algo/core/germline.cpp
algo/core/germline.cpp
+1
-0
algo/core/kmeraffect.cpp
algo/core/kmeraffect.cpp
+1
-1
algo/core/kmerstore.cpp
algo/core/kmerstore.cpp
+1
-1
algo/core/kmerstore.h
algo/core/kmerstore.h
+2
-0
algo/core/labels.cpp
algo/core/labels.cpp
+29
-0
algo/core/labels.h
algo/core/labels.h
+1
-1
algo/core/output.cpp
algo/core/output.cpp
+1
-0
algo/core/read_score.cpp
algo/core/read_score.cpp
+12
-0
algo/core/read_score.h
algo/core/read_score.h
+13
-0
algo/core/representative.cpp
algo/core/representative.cpp
+4
-6
algo/core/representative.h
algo/core/representative.h
+7
-2
algo/core/segment.cpp
algo/core/segment.cpp
+14
-8
algo/core/segment.h
algo/core/segment.h
+3
-1
algo/core/similarityMatrix.cpp
algo/core/similarityMatrix.cpp
+1
-1
algo/core/windowExtractor.cpp
algo/core/windowExtractor.cpp
+3
-1
algo/core/windowExtractor.h
algo/core/windowExtractor.h
+4
-1
algo/core/windows.cpp
algo/core/windows.cpp
+7
-3
algo/core/windows.h
algo/core/windows.h
+8
-2
algo/lib/CLI11.hpp
algo/lib/CLI11.hpp
+2151
-795
algo/lib/CLI11_json.cpp
algo/lib/CLI11_json.cpp
+116
-0
algo/lib/CLI11_json.hpp
algo/lib/CLI11_json.hpp
+10
-0
algo/release
algo/release
+1
-1
algo/tests/Makefile
algo/tests/Makefile
+6
-3
algo/tests/bugs/bug20131218.should-get
algo/tests/bugs/bug20131218.should-get
+1
-1
algo/tests/bugs/bug20141024.should-get
algo/tests/bugs/bug20141024.should-get
+1
-1
algo/tests/bugs/bug20150604.should-get
algo/tests/bugs/bug20150604.should-get
+1
-1
algo/tests/bugs/bug20160121.should-get
algo/tests/bugs/bug20160121.should-get
+1
-1
algo/tests/bugs/bug2249.should-get
algo/tests/bugs/bug2249.should-get
+1
-1
algo/tests/data/config.vidjil
algo/tests/data/config.vidjil
+8
-0
algo/tests/data/labels-json.vidjil
algo/tests/data/labels-json.vidjil
+8
-0
algo/tests/data/representative-few-reads.fa
algo/tests/data/representative-few-reads.fa
+27
-0
algo/tests/data/segment-or-not.fa
algo/tests/data/segment-or-not.fa
+11
-0
algo/tests/data/test-random-consensus.fa.gz
algo/tests/data/test-random-consensus.fa.gz
+0
-0
algo/tests/data/trd-dd2-dd3.fa
algo/tests/data/trd-dd2-dd3.fa
+1
-1
algo/tests/repseq_vdj.py
algo/tests/repseq_vdj.py
+8
-1
algo/tests/should-get-tests/00-clean-memory-on-exit.should-get
...tests/should-get-tests/00-clean-memory-on-exit.should-get
+12
-0
algo/tests/should-get-tests/00-no-compilation-warning.should-get
...sts/should-get-tests/00-no-compilation-warning.should-get
+9
-0
algo/tests/should-get-tests/3344-bad-filtering.should-get
algo/tests/should-get-tests/3344-bad-filtering.should-get
+1
-1
algo/tests/should-get-tests/airr-S22.should-get
algo/tests/should-get-tests/airr-S22.should-get
+2
-2
algo/tests/should-get-tests/alternative_genes.should-get
algo/tests/should-get-tests/alternative_genes.should-get
+2
-2
algo/tests/should-get-tests/ambiguous_representative2.should-get
...sts/should-get-tests/ambiguous_representative2.should-get
+1
-1
algo/tests/should-get-tests/cd-trimmed.should-get
algo/tests/should-get-tests/cd-trimmed.should-get
+1
-1
algo/tests/should-get-tests/cd.should-get
algo/tests/should-get-tests/cd.should-get
+1
-1
algo/tests/should-get-tests/cdr3-stopcodon.should-get
algo/tests/should-get-tests/cdr3-stopcodon.should-get
+1
-1
algo/tests/should-get-tests/cdr3-vdj-fa.should-get
algo/tests/should-get-tests/cdr3-vdj-fa.should-get
+1
-1
algo/tests/should-get-tests/cgi-align.should-get
algo/tests/should-get-tests/cgi-align.should-get
+1
-0
algo/tests/should-get-tests/cgi-align2.should-get
algo/tests/should-get-tests/cgi-align2.should-get
+1
-0
algo/tests/should-get-tests/cgi-align3.should-get
algo/tests/should-get-tests/cgi-align3.should-get
+1
-0
algo/tests/should-get-tests/chimera-2549.should-get
algo/tests/should-get-tests/chimera-2549.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake-2.should-get
algo/tests/should-get-tests/chimera-fake-2.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake-D.should-get
algo/tests/should-get-tests/chimera-fake-D.should-get
+2
-2
algo/tests/should-get-tests/chimera-fake-VJ-germlines-trim.should-get
...hould-get-tests/chimera-fake-VJ-germlines-trim.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake-VJ-germlines.should-get
...sts/should-get-tests/chimera-fake-VJ-germlines.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake-VJ.should-get
algo/tests/should-get-tests/chimera-fake-VJ.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake-half.should-get
algo/tests/should-get-tests/chimera-fake-half.should-get
+1
-1
algo/tests/should-get-tests/chimera-fake.should-get
algo/tests/should-get-tests/chimera-fake.should-get
+1
-1
algo/tests/should-get-tests/chimera.should-get
algo/tests/should-get-tests/chimera.should-get
+1
-1
algo/tests/should-get-tests/clones_lec.should-get
algo/tests/should-get-tests/clones_lec.should-get
+1
-1
algo/tests/should-get-tests/clones_simul_cluster.should-get
algo/tests/should-get-tests/clones_simul_cluster.should-get
+1
-1
algo/tests/should-get-tests/colinear-D7-27--J1.should-get
algo/tests/should-get-tests/colinear-D7-27--J1.should-get
+1
-1
algo/tests/should-get-tests/combo-grep-reads.should-get
algo/tests/should-get-tests/combo-grep-reads.should-get
+3
-1
algo/tests/should-get-tests/common-V-D.should-get
algo/tests/should-get-tests/common-V-D.should-get
+1
-1
algo/tests/should-get-tests/doc-examples.should-get
algo/tests/should-get-tests/doc-examples.should-get
+1
-1
algo/tests/should-get-tests/error-deprecated-options.should-get
...ests/should-get-tests/error-deprecated-options.should-get
+12
-0
algo/tests/should-get-tests/error-unknown-option.should-get
algo/tests/should-get-tests/error-unknown-option.should-get
+9
-0
algo/tests/should-get-tests/example_mouse.should-get
algo/tests/should-get-tests/example_mouse.should-get
+1
-1
algo/tests/should-get-tests/filter.should-get
algo/tests/should-get-tests/filter.should-get
+9
-0
algo/tests/should-get-tests/labels-grep-reads.should-get
algo/tests/should-get-tests/labels-grep-reads.should-get
+12
-0
algo/tests/should-get-tests/labels-json.should-get
algo/tests/should-get-tests/labels-json.should-get
+22
-0
algo/tests/should-get-tests/large-r.should-get
algo/tests/should-get-tests/large-r.should-get
+1
-1
algo/tests/should-get-tests/multi-segment.should-get
algo/tests/should-get-tests/multi-segment.should-get
+1
-1
algo/tests/should-get-tests/multi-tiny-segment.should-get
algo/tests/should-get-tests/multi-tiny-segment.should-get
+1
-1
algo/tests/should-get-tests/no-cdr3-json.should-get
algo/tests/should-get-tests/no-cdr3-json.should-get
+1
-1
algo/tests/should-get-tests/no-cdr3.should-get
algo/tests/should-get-tests/no-cdr3.should-get
+1
-1
algo/tests/should-get-tests/overlap-stdout.should-get
algo/tests/should-get-tests/overlap-stdout.should-get
+1
-1
algo/tests/should-get-tests/quality-json.should-get
algo/tests/should-get-tests/quality-json.should-get
+1
-1
algo/tests/should-get-tests/read-config.should-get
algo/tests/should-get-tests/read-config.should-get
+14
-0
algo/tests/should-get-tests/representative-N.should-get
algo/tests/should-get-tests/representative-N.should-get
+1
-1
algo/tests/should-get-tests/representative-min-cover.should-get
...ests/should-get-tests/representative-min-cover.should-get
+4
-0
algo/tests/should-get-tests/representative-random-read-chooser.should-get
...d-get-tests/representative-random-read-chooser.should-get
+13
-0
algo/tests/should-get-tests/revcomp.should-get
algo/tests/should-get-tests/revcomp.should-get
+1
-1
algo/tests/should-get-tests/segment_S22.should-get
algo/tests/should-get-tests/segment_S22.should-get
+1
-1
algo/tests/should-get-tests/segment_simul.should-get
algo/tests/should-get-tests/segment_simul.should-get
+1
-1
algo/tests/should-get-tests/sequences_of_interest.should-get
algo/tests/should-get-tests/sequences_of_interest.should-get
+1
-1
algo/tests/should-get-tests/several-g.should-get
algo/tests/should-get-tests/several-g.should-get
+12
-0
algo/tests/should-get-tests/somatic.should-get
algo/tests/should-get-tests/somatic.should-get
+1
-1
algo/tests/should-get-tests/stanford-debug.should-get
algo/tests/should-get-tests/stanford-debug.should-get
+1
-1
algo/tests/should-get-tests/stanford-detailed.should-get
algo/tests/should-get-tests/stanford-detailed.should-get
+3
-3
algo/tests/should-get-tests/stanford-fuse.should-get
algo/tests/should-get-tests/stanford-fuse.should-get
+1
-1
algo/tests/should-get-tests/stanford-germlines.should-get
algo/tests/should-get-tests/stanford-germlines.should-get
+2
-2
algo/tests/should-get-tests/stanford-json-limits.should-get
algo/tests/should-get-tests/stanford-json-limits.should-get
+1
-1
algo/tests/should-get-tests/stanford-json.should-get
algo/tests/should-get-tests/stanford-json.should-get
+9
-9
algo/tests/should-get-tests/stanford-k14.should-get
algo/tests/should-get-tests/stanford-k14.should-get
+1
-4
algo/tests/should-get-tests/stanford-labels-W.should-get
algo/tests/should-get-tests/stanford-labels-W.should-get
+3
-3
algo/tests/should-get-tests/stanford-labels.should-get
algo/tests/should-get-tests/stanford-labels.should-get
+1
-1
algo/tests/should-get-tests/stanford-no-cd.should-get
algo/tests/should-get-tests/stanford-no-cd.should-get
+4
-0
algo/tests/should-get-tests/stanford-segment-x100-first.should-get
...s/should-get-tests/stanford-segment-x100-first.should-get
+1
-1
algo/tests/should-get-tests/stanford-t1.should-get
algo/tests/should-get-tests/stanford-t1.should-get
+2
-2
algo/tests/should-get-tests/stanford-w100.should-get
algo/tests/should-get-tests/stanford-w100.should-get
+6
-6
algo/tests/should-get-tests/stanford-wall.should-get
algo/tests/should-get-tests/stanford-wall.should-get
+1
-1
algo/tests/should-get-tests/stanford-xyz.should-get
algo/tests/should-get-tests/stanford-xyz.should-get
+6
-1
algo/tests/should-get-tests/stanford.should-get
algo/tests/should-get-tests/stanford.should-get
+4
-4
algo/tests/should-get-tests/tabs-in-output.should-get
algo/tests/should-get-tests/tabs-in-output.should-get
+4
-0
algo/tests/should-get-tests/tools-align-trd.should-get
algo/tests/should-get-tests/tools-align-trd.should-get
+1
-0
algo/tests/should-get-tests/tools-align.should-get
algo/tests/should-get-tests/tools-align.should-get
+1
-0
algo/tests/should-get-tests/tools-similarity.should-get
algo/tests/should-get-tests/tools-similarity.should-get
+1
-0
algo/tests/should-get-tests/tools-vdj-assign-direct-input.should-get
...should-get-tests/tools-vdj-assign-direct-input.should-get
+1
-0
algo/tests/should-get-tests/tools-vdj-assign.should-get
algo/tests/should-get-tests/tools-vdj-assign.should-get
+1
-0
algo/tests/should-get-tests/trb-only-VJ.should-get
algo/tests/should-get-tests/trb-only-VJ.should-get
+1
-1
algo/tests/should-get-tests/trd-dd2-dd3-complete.should-get
algo/tests/should-get-tests/trd-dd2-dd3-complete.should-get
+1
-1
algo/tests/should-get-tests/trd-dd2-dd3-incomplete.should-get
.../tests/should-get-tests/trd-dd2-dd3-incomplete.should-get
+5
-5
algo/tests/should-get-tests/trd-dd2-dd3.should-get
algo/tests/should-get-tests/trd-dd2-dd3.should-get
+1
-1
algo/tests/should-get-tests/vidjil-custom-cost.should-get
algo/tests/should-get-tests/vidjil-custom-cost.should-get
+1
-1
algo/tests/should-get-tests/vidjil-error-no-germline.should-get
...ests/should-get-tests/vidjil-error-no-germline.should-get
+3
-0
algo/tests/should-get-tests/vidjil-h-examples.should-get
algo/tests/should-get-tests/vidjil-h-examples.should-get
+1
-1
algo/tests/should-get-tests/vidjil-help-advanced.should-get
algo/tests/should-get-tests/vidjil-help-advanced.should-get
+2
-2
algo/tests/should-get-tests/vidjil-help.should-get
algo/tests/should-get-tests/vidjil-help.should-get
+3
-3
algo/tests/should-get-tests/vidjil-warning-z.should-get
algo/tests/should-get-tests/vidjil-warning-z.should-get
+1
-1
algo/tests/should-get-tests/warning-all.should-get
algo/tests/should-get-tests/warning-all.should-get
+12
-0
algo/tests/should-get-tests/what-V.should-get
algo/tests/should-get-tests/what-V.should-get
+1
-1
algo/tests/should-vdj-tests/3518-long-deletion.should-vdj.fa
algo/tests/should-vdj-tests/3518-long-deletion.should-vdj.fa
+10
-0
algo/tests/should-vdj-tests/igl-largedel-j.should-vdj.fa
algo/tests/should-vdj-tests/igl-largedel-j.should-vdj.fa
+1
-1
algo/tests/should-vdj-to-tap.py
algo/tests/should-vdj-to-tap.py
+68
-9
algo/tests/unit-tests/testAffectAnalyser.cpp
algo/tests/unit-tests/testAffectAnalyser.cpp
+3
-1
algo/vidjil.cpp
algo/vidjil.cpp
+187
-136
browser/css/dark.css
browser/css/dark.css
+14
-9
browser/css/light.css
browser/css/light.css
+18
-9
browser/css/segmenter_page.css
browser/css/segmenter_page.css
+14
-9
browser/css/svg.css
browser/css/svg.css
+18
-9
browser/css/talk.css
browser/css/talk.css
+18
-9
browser/css/vidjil.less
browser/css/vidjil.less
+16
-8
browser/index.html
browser/index.html
+33
-26
browser/js/clone.js
browser/js/clone.js
+5
-8
browser/js/crossDomain.js
browser/js/crossDomain.js
+2
-2
browser/js/database.js
browser/js/database.js
+57
-17
browser/js/export.js
browser/js/export.js
+7
-7
browser/js/model.js
browser/js/model.js
+21
-15
browser/js/segmenter.js
browser/js/segmenter.js
+98
-17
browser/js/tools.js
browser/js/tools.js
+15
-0
browser/test/Makefile
browser/test/Makefile
+4
-2
browser/test/QUnit/testFiles/model_test.js
browser/test/QUnit/testFiles/model_test.js
+22
-0
browser/test/QUnit/testFiles/segmenter_test.js
browser/test/QUnit/testFiles/segmenter_test.js
+27
-2
browser/test/functional/browser_test.rb
browser/test/functional/browser_test.rb
+3
-3
browser/test/functional/external_test_imgt-igblast.rb
browser/test/functional/external_test_imgt-igblast.rb
+1
-1
browser/test/functional/test_loading_analysis.rb
browser/test/functional/test_loading_analysis.rb
+4
-4
browser/test/functional/test_multilocus.rb
browser/test/functional/test_multilocus.rb
+43
-5
browser/test/functional/test_segmenter-page.rb
browser/test/functional/test_segmenter-page.rb
+1
-2
browser/test/functional/vidjil_browser.rb
browser/test/functional/vidjil_browser.rb
+47
-5
browser/test/launch_functional_tests
browser/test/launch_functional_tests
+17
-6
browser/test/tested-browsers
browser/test/tested-browsers
+1
-0
doc/CHANGELOG
doc/CHANGELOG
+9
-0
doc/credits.md
doc/credits.md
+8
-7
doc/dev.org
doc/dev.org
+18
-1
doc/tutorial/common-headers.tex
doc/tutorial/common-headers.tex
+14
-2
doc/tutorial/images
doc/tutorial/images
+0
-1
doc/tutorial/mastering-vidjil.tex
doc/tutorial/mastering-vidjil.tex
+20
-422
doc/tutorial/tutorial-clones.tex
doc/tutorial/tutorial-clones.tex
+310
-0
doc/tutorial/tutorial-export.tex
doc/tutorial/tutorial-export.tex
+77
-0
doc/tutorial/tutorial-quality.tex
doc/tutorial/tutorial-quality.tex
+34
-0
doc/tutorial/tutorial-server.tex
doc/tutorial/tutorial-server.tex
+129
-0
doc/tutorial/tutorial-several-samples.tex
doc/tutorial/tutorial-several-samples.tex
+67
-0
doc/user.md
doc/user.md
+52
-35
doc/vidjil-algo.md
doc/vidjil-algo.md
+117
-103
docker/vidjil-server/Dockerfile
docker/vidjil-server/Dockerfile
+2
-2
server/Makefile
server/Makefile
+6
-2
server/web2py/applications/vidjil/controllers/clonedb.py
server/web2py/applications/vidjil/controllers/clonedb.py
+1
-0
server/web2py/applications/vidjil/controllers/default.py
server/web2py/applications/vidjil/controllers/default.py
+34
-12
server/web2py/applications/vidjil/controllers/results_file.py
...er/web2py/applications/vidjil/controllers/results_file.py
+5
-13
server/web2py/applications/vidjil/controllers/segmenter.py
server/web2py/applications/vidjil/controllers/segmenter.py
+1
-1
server/web2py/applications/vidjil/models/SampleSet.py
server/web2py/applications/vidjil/models/SampleSet.py
+12
-0
server/web2py/applications/vidjil/models/task.py
server/web2py/applications/vidjil/models/task.py
+2
-1
server/web2py/applications/vidjil/modules/vidjil_utils.py
server/web2py/applications/vidjil/modules/vidjil_utils.py
+1
-1
tools/pear.py
tools/pear.py
+6
-6
tools/should.py
tools/should.py
+233
-113
tools/tests/Makefile
tools/tests/Makefile
+1
-0
No files found.
.gitlab-ci.yml
View file @
eedefd37
...
@@ -223,7 +223,7 @@ test_browser-functional:
...
@@ -223,7 +223,7 @@ test_browser-functional:
-
make -C browser
-
make -C browser
-
source /etc/profile.d/rvm.sh
-
source /etc/profile.d/rvm.sh
-
rvm use 2.6.1
-
rvm use 2.6.1
-
HEADLESS=1 make -C browser/test functional
-
HEADLESS=1 make -C browser/test functional
BROWSERS=--browsers-from-file
artifacts
:
artifacts
:
paths
:
paths
:
-
browser/
-
browser/
...
...
Makefile.algo
View file @
eedefd37
# Becomes ../Makefile in a release
# algo/Makefile.algo (git)
# /Makefile (in a release)
.PHONY
:
all germline vidjil-algo demo test
.PHONY
:
all germline vidjil-algo demo test
...
...
algo/core/affectanalyser.cpp
View file @
eedefd37
...
@@ -61,12 +61,13 @@ int KmerAffectAnalyser::count(const KmerAffect &affect) const{
...
@@ -61,12 +61,13 @@ int KmerAffectAnalyser::count(const KmerAffect &affect) const{
int
KmerAffectAnalyser
::
minimize
(
const
KmerAffect
&
affect
,
int
margin
,
int
width
)
const
{
int
KmerAffectAnalyser
::
minimize
(
const
KmerAffect
&
affect
,
int
margin
,
int
width
)
const
{
int
i
=
margin
;
int
i
=
margin
;
int
i_stop
=
MIN
(
affectations
.
size
()
-
margin
-
kms
.
getS
(),
seq
.
length
()
-
width
);
uint64_t
val_max
=
0
;
uint64_t
val_max
=
0
;
int
i_max
=
NO_MINIMIZING_POSITION
;
int
i_max
=
NO_MINIMIZING_POSITION
;
for
(
vector
<
KmerAffect
>::
const_iterator
it
=
affectations
.
begin
()
+
margin
;
for
(
vector
<
KmerAffect
>::
const_iterator
it
=
affectations
.
begin
()
+
margin
;
i
t
<
affectations
.
end
()
-
margin
&&
i
<=
(
int
)
seq
.
length
()
-
width
;
i
<=
i_stop
;
it
++
,
i
++
)
{
it
++
,
i
++
)
{
...
@@ -83,7 +84,7 @@ int KmerAffectAnalyser::minimize(const KmerAffect &affect, int margin, int width
...
@@ -83,7 +84,7 @@ int KmerAffectAnalyser::minimize(const KmerAffect &affect, int margin, int width
if
(
i_max
==
NO_MINIMIZING_POSITION
)
if
(
i_max
==
NO_MINIMIZING_POSITION
)
return
i_max
;
return
i_max
;
return
i_max
+
(
seq
.
length
()
-
affectations
.
size
()
+
1
)
/
2
;
return
i_max
+
kms
.
getS
(
)
/
2
;
}
}
...
@@ -217,10 +218,16 @@ affect_infos KmerAffectAnalyser::getMaximum(const KmerAffect &before,
...
@@ -217,10 +218,16 @@ affect_infos KmerAffectAnalyser::getMaximum(const KmerAffect &before,
results
.
nb_before_right
++
;
results
.
nb_before_right
++
;
}
}
left_evalue
=
kms
.
getProbabilityAtLeastOrAbove
(
before
,
KmerAffect
left_affect
=
before
;
KmerAffect
right_affect
=
after
;
if
(
kms
.
multiple_in_one
)
{
left_affect
=
AFFECT_NOT_UNKNOWN
;
right_affect
=
AFFECT_NOT_UNKNOWN
;
}
left_evalue
=
kms
.
getProbabilityAtLeastOrAbove
(
left_affect
,
results
.
nb_before_left
,
results
.
nb_before_left
,
1
+
results
.
last_pos_max
);
1
+
results
.
last_pos_max
);
right_evalue
=
kms
.
getProbabilityAtLeastOrAbove
(
after
,
right_evalue
=
kms
.
getProbabilityAtLeastOrAbove
(
right_affect
,
results
.
nb_after_right
,
results
.
nb_after_right
,
seq
.
size
()
-
1
-
results
.
first_pos_max
);
seq
.
size
()
-
1
-
results
.
first_pos_max
);
...
@@ -244,7 +251,11 @@ affect_infos KmerAffectAnalyser::getMaximum(const KmerAffect &before,
...
@@ -244,7 +251,11 @@ affect_infos KmerAffectAnalyser::getMaximum(const KmerAffect &before,
double
KmerAffectAnalyser
::
getProbabilityAtLeastOrAbove
(
const
KmerAffect
&
kmer
,
int
at_least
)
const
{
double
KmerAffectAnalyser
::
getProbabilityAtLeastOrAbove
(
const
KmerAffect
&
kmer
,
int
at_least
)
const
{
return
kms
.
getProbabilityAtLeastOrAbove
(
kmer
,
at_least
,
seq
.
size
());
KmerAffect
affect
=
kmer
;
if
(
kms
.
multiple_in_one
)
{
affect
=
AFFECT_NOT_UNKNOWN
;
}
return
kms
.
getProbabilityAtLeastOrAbove
(
affect
,
at_least
,
seq
.
size
());
}
}
pair
<
double
,
double
>
KmerAffectAnalyser
::
getLeftRightProbabilityAtLeastOrAbove
()
const
{
pair
<
double
,
double
>
KmerAffectAnalyser
::
getLeftRightProbabilityAtLeastOrAbove
()
const
{
...
...
algo/core/automaton.hpp
View file @
eedefd37
...
@@ -169,12 +169,14 @@ void PointerACAutomaton<Info>::insert(const seqtype &seq, Info info) {
...
@@ -169,12 +169,14 @@ void PointerACAutomaton<Info>::insert(const seqtype &seq, Info info) {
pointer_state
<
Info
>
*
state
=
getInitialState
();
pointer_state
<
Info
>
*
state
=
getInitialState
();
size_t
seq_length
=
seq
.
length
();
size_t
seq_length
=
seq
.
length
();
size_t
i
;
size_t
i
;
bool
existing_final
=
true
;
for
(
i
=
0
;
i
<
seq_length
&&
state
->
transition
(
seq
[
i
])
!=
NULL
;
i
++
)
{
for
(
i
=
0
;
i
<
seq_length
&&
state
->
transition
(
seq
[
i
])
!=
NULL
;
i
++
)
{
state
=
state
->
transition
(
seq
[
i
]);
state
=
state
->
transition
(
seq
[
i
]);
}
}
if
(
i
<
seq_length
)
{
if
(
i
<
seq_length
)
{
existing_final
=
false
;
// Need to create more states
// Need to create more states
for
(;
i
<
seq_length
;
i
++
)
{
for
(;
i
<
seq_length
;
i
++
)
{
pointer_state
<
Info
>
*
new_state
=
new
pointer_state
<
Info
>
();
pointer_state
<
Info
>
*
new_state
=
new
pointer_state
<
Info
>
();
...
@@ -183,16 +185,14 @@ void PointerACAutomaton<Info>::insert(const seqtype &seq, Info info) {
...
@@ -183,16 +185,14 @@ void PointerACAutomaton<Info>::insert(const seqtype &seq, Info info) {
}
}
}
}
state
->
is_final
=
true
;
state
->
is_final
=
true
;
if
(
state
->
informations
.
front
().
isNull
()
)
{
if
(
!
existing_final
)
{
this
->
nb_kmers_inserted
++
;
this
->
nb_kmers_inserted
++
;
this
->
kmers_inserted
[
info
]
++
;
this
->
kmers_inserted
[
info
]
++
;
state
->
informations
.
front
()
+=
info
;
}
else
{
if
(
this
->
multiple_info
)
state
->
informations
.
push_back
(
info
);
else
state
->
informations
.
front
()
+=
info
;
}
}
if
(
state
->
informations
.
front
().
isNull
()
||
!
this
->
multiple_info
)
state
->
informations
.
front
()
+=
info
;
else
state
->
informations
.
push_back
(
info
);
}
}
template
<
class
Info
>
template
<
class
Info
>
...
...
algo/core/bam.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/bioreader.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/bioreader.hpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/cluster-junctions.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/compare-all.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/dynprog.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/fasta.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/germline.cpp
View file @
eedefd37
...
@@ -387,6 +387,7 @@ void MultiGermline::build_with_one_index(string seed, bool set_index)
...
@@ -387,6 +387,7 @@ void MultiGermline::build_with_one_index(string seed, bool set_index)
index
=
KmerStoreFactory
<
KmerAffect
>::
createIndex
(
indexType
,
expand_seed
(
seed
),
rc
);
index
=
KmerStoreFactory
<
KmerAffect
>::
createIndex
(
indexType
,
expand_seed
(
seed
),
rc
);
index
->
refs
=
1
;
index
->
refs
=
1
;
insert_in_one_index
(
index
,
set_index
);
insert_in_one_index
(
index
,
set_index
);
index
->
multiple_in_one
=
true
;
}
}
void
MultiGermline
::
finish
()
{
void
MultiGermline
::
finish
()
{
...
...
algo/core/kmeraffect.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/kmerstore.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
...
algo/core/kmerstore.h
View file @
eedefd37
...
@@ -82,6 +82,7 @@ public:
...
@@ -82,6 +82,7 @@ public:
static
int
last_id
;
static
int
last_id
;
int
id
;
// id of this index
int
id
;
// id of this index
int
refs
;
// number of germlines using this index
int
refs
;
// number of germlines using this index
bool
multiple_in_one
;
list
<
pair
<
T
,
BioReader
>
>
labels
;
list
<
pair
<
T
,
BioReader
>
>
labels
;
...
@@ -205,6 +206,7 @@ IKmerStore<T>::IKmerStore() {
...
@@ -205,6 +206,7 @@ IKmerStore<T>::IKmerStore() {
id
=
++
last_id
;
id
=
++
last_id
;
refs
=
0
;
refs
=
0
;
finished_building
=
false
;
finished_building
=
false
;
multiple_in_one
=
false
;
}
}
template
<
class
T
>
int
IKmerStore
<
T
>::
last_id
=
0
;
template
<
class
T
>
int
IKmerStore
<
T
>::
last_id
=
0
;
...
...
algo/core/labels.cpp
View file @
eedefd37
...
@@ -4,6 +4,35 @@
...
@@ -4,6 +4,35 @@
#include <cstdlib>
#include <cstdlib>
#include "tools.h"
#include "tools.h"
#include "lib/json.hpp"
using
nlohmann
::
json
;
json
load_into_map_from_json
(
map
<
string
,
string
>
&
the_map
,
string
json_file
)
{
if
(
!
json_file
.
size
())
return
{};
cout
<<
" <== "
<<
json_file
<<
endl
;
std
::
ifstream
json_file_stream
(
json_file
);
json
j
;
json_file_stream
>>
j
;
json
jj
=
j
[
"config"
][
"labels"
]
;
int
n
=
0
;
for
(
json
::
iterator
label
=
jj
.
begin
();
label
!=
jj
.
end
();
++
label
)
{
string
name
=
(
*
label
)[
"name"
].
get
<
std
::
string
>
();
string
sequence
=
(
*
label
)[
"sequence"
].
get
<
std
::
string
>
();
the_map
[
sequence
]
=
name
;
n
++
;
}
cout
<<
" ==> "
<<
n
<<
" labels"
<<
endl
;
return
jj
;
}
void
load_into_map
(
map
<
string
,
string
>
&
the_map
,
string
map_file
,
string
default_value
)
void
load_into_map
(
map
<
string
,
string
>
&
the_map
,
string
map_file
,
string
default_value
)
{
{
...
...
algo/core/labels.h
View file @
eedefd37
...
@@ -7,4 +7,4 @@
...
@@ -7,4 +7,4 @@
#include "bioreader.hpp"
#include "bioreader.hpp"
void
load_into_map
(
map
<
string
,
string
>
&
the_map
,
string
map_file
,
string
default_value
);
void
load_into_map
(
map
<
string
,
string
>
&
the_map
,
string
map_file
,
string
default_value
);
json
load_into_map_from_json
(
map
<
string
,
string
>
&
the_map
,
string
json_file
);
algo/core/output.cpp
View file @
eedefd37
...
@@ -105,6 +105,7 @@ SampleOutput::~SampleOutput()
...
@@ -105,6 +105,7 @@ SampleOutput::~SampleOutput()
void
SampleOutput
::
out
(
ostream
&
s
)
void
SampleOutput
::
out
(
ostream
&
s
)
{
{
UNUSED
(
s
);
}
}
void
SampleOutput
::
addClone
(
junction
junction
,
CloneOutput
*
clone
)
void
SampleOutput
::
addClone
(
junction
junction
,
CloneOutput
*
clone
)
...
...
algo/core/read_score.cpp
View file @
eedefd37
...
@@ -101,3 +101,15 @@ float ReadQualityScore::getScore(const Sequence &sequence) const {
...
@@ -101,3 +101,15 @@ float ReadQualityScore::getScore(const Sequence &sequence) const {
percent_quality
=
GOOD_QUALITY
;
percent_quality
=
GOOD_QUALITY
;
return
percent_quality
*
sequence
.
sequence
.
size
()
/
GOOD_QUALITY
;
return
percent_quality
*
sequence
.
sequence
.
size
()
/
GOOD_QUALITY
;
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////// RandomScore ///////////////////////////////
////////////////////////////////////////////////////////////////////////////////
RandomScore
::
RandomScore
(){
srand
(
1
);}
// Ensures a deterministic output
RandomScore
::~
RandomScore
(){}
float
RandomScore
::
getScore
(
const
Sequence
&
sequence
)
const
{
UNUSED
(
sequence
);
return
rand
()
%
500
;
}
algo/core/read_score.h
View file @
eedefd37
...
@@ -91,4 +91,17 @@ class ReadQualityScore: public VirtualReadScore {
...
@@ -91,4 +91,17 @@ class ReadQualityScore: public VirtualReadScore {
*/
*/
float
getScore
(
const
Sequence
&
sequence
)
const
;
float
getScore
(
const
Sequence
&
sequence
)
const
;
};
};
/**
* A very simple implementation of VirtualReadScore.
* The score is random.
*/
class
RandomScore
:
public
VirtualReadScore
{
public:
RandomScore
();
~
RandomScore
();
float
getScore
(
const
Sequence
&
sequence
)
const
;
};
#endif
#endif
algo/core/representative.cpp
View file @
eedefd37
...
@@ -81,7 +81,7 @@ KmerRepresentativeComputer::KmerRepresentativeComputer(list<Sequence> &r,
...
@@ -81,7 +81,7 @@ KmerRepresentativeComputer::KmerRepresentativeComputer(list<Sequence> &r,
string
seed
)
string
seed
)
:
RepresentativeComputer
(
r
),
seed
(
seed
),
stability_limit
(
DEFAULT_STABILITY_LIMIT
){}
:
RepresentativeComputer
(
r
),
seed
(
seed
),
stability_limit
(
DEFAULT_STABILITY_LIMIT
){}
void
KmerRepresentativeComputer
::
compute
(
bool
try_hard
)
{
void
KmerRepresentativeComputer
::
compute
(
VirtualReadScore
&
readScorer
,
bool
try_hard
)
{
assert
(
coverage_reference_length
>
0
);
assert
(
coverage_reference_length
>
0
);
assert
(
required
.
length
()
>
0
);
assert
(
required
.
length
()
>
0
);
is_computed
=
false
;
is_computed
=
false
;
...
@@ -114,10 +114,8 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
...
@@ -114,10 +114,8 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
index
[
i
]
->
insert
(
it
->
sequence
,
it
->
label
,
false
,
0
,
seeds
[
i
]);
index
[
i
]
->
insert
(
it
->
sequence
,
it
->
label
,
false
,
0
,
seeds
[
i
]);
}
}
// Create a read chooser to have the sequences sorted by length
// Create a read chooser to have the sequences sorted on the criteria we want
ReadQualityScore
*
rlc
=
new
ReadQualityScore
();
ReadChooser
rc
(
sequences
,
readScorer
);
ReadChooser
rc
(
sequences
,
*
rlc
);
delete
rlc
;
// Traverse the sequences to get the desired representative
// Traverse the sequences to get the desired representative
size_t
pos_longest_run
=
0
;
size_t
pos_longest_run
=
0
;
...
@@ -219,7 +217,7 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
...
@@ -219,7 +217,7 @@ void KmerRepresentativeComputer::compute(bool try_hard) {
if
(
coverage
<
THRESHOLD_BAD_COVERAGE
&&
!
try_hard
)
{
if
(
coverage
<
THRESHOLD_BAD_COVERAGE
&&
!
try_hard
)
{
compute
(
true
);
compute
(
readScorer
,
true
);
delete
index
[
0
];
delete
index
[
0
];
if
(
cover_longest_run
)
if
(
cover_longest_run
)
...
...
algo/core/representative.h
View file @
eedefd37
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <list>
#include <list>
#include "bioreader.hpp"
#include "bioreader.hpp"
#include "kmerstore.h"
#include "kmerstore.h"
#include "read_score.h"
using
namespace
std
;
using
namespace
std
;
...
@@ -13,6 +14,8 @@ using namespace std;
...
@@ -13,6 +14,8 @@ using namespace std;
#define THRESHOLD_BAD_COVERAGE .5
/* Threshold below which the representatie
#define THRESHOLD_BAD_COVERAGE .5
/* Threshold below which the representatie
coverage is considered bad */
coverage is considered bad */
static
ReadQualityScore
DEFAULT_READ_SCORE
;
/**
/**
* Compute a representative sequence from a list of sequences.
* Compute a representative sequence from a list of sequences.
* The sequences are supposed to share a common juction.
* The sequences are supposed to share a common juction.
...
@@ -57,7 +60,8 @@ public:
...
@@ -57,7 +60,8 @@ public:
* Compute the representative depending on the parameters set by the functions
* Compute the representative depending on the parameters set by the functions
* @pre setRequiredSequence() must have been called (with a non-empty string).
* @pre setRequiredSequence() must have been called (with a non-empty string).
*/
*/
virtual
void
compute
(
bool
try_hard
=
false
)
=
0
;
virtual
void
compute
(
VirtualReadScore
&
readScorer
=
DEFAULT_READ_SCORE
,
bool
try_hard
=
false
)
=
0
;
/**
/**
* @param min_cover: minimal number of reads supporting each position of the
* @param min_cover: minimal number of reads supporting each position of the
...
@@ -129,7 +133,8 @@ public:
...
@@ -129,7 +133,8 @@ public:
/**
/**
* @pre setCoverageReferenceLength() must have been called previously
* @pre setCoverageReferenceLength() must have been called previously
*/
*/
void
compute
(
bool
try_hard
=
false
);
void
compute
(
VirtualReadScore
&
readScorer
=
DEFAULT_READ_SCORE
,
bool
try_hard
=
false
);
private:
private:
...
...
algo/core/segment.cpp
View file @
eedefd37
/*
/*
This file is part of Vidjil <http://www.vidjil.org>
This file is part of Vidjil <http://www.vidjil.org>
Copyright (C) 2011-201
7 by
Bonsai bioinformatics
Copyright (C) 2011-201
9 by VidjilNet consortium and
Bonsai bioinformatics
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
at CRIStAL (UMR CNRS 9189, Université Lille) and Inria Lille
Contributors:
Contributors:
Mathieu Giraud <mathieu.giraud@vidjil.org>
Mathieu Giraud <mathieu.giraud@vidjil.org>
...
@@ -361,7 +361,7 @@ string Segmenter::getInfoLine() const
...
@@ -361,7 +361,7 @@ string Segmenter::getInfoLine() const
{
{
string
s
=
""
;
string
s
=
""
;
s
+=
(
segmented
?
""
:
"! "
)
+
info
;
s
+=
(
segmented
?
""
:
"
\t
! "
)
+
info
;
s
+=
" "
+
info_extra
;
s
+=
" "
+
info_extra
;
s
+=
" "
+
segmented_germline
->
code
;
s
+=
" "
+
segmented_germline
->
code
;
s
+=
" "
+
string
(
segmented_mesg
[
because
])
;
s
+=
" "
+
string
(
segmented_mesg
[
because
])
;
...
@@ -759,7 +759,7 @@ void Segmenter::setSegmentationStatus(int status) {
...
@@ -759,7 +759,7 @@ void Segmenter::setSegmentationStatus(int status) {
string
check_and_resolve_overlap
(
string
seq
,
int
seq_begin
,
int
seq_end
,
string
check_and_resolve_overlap
(
string
seq
,
int
seq_begin
,
int
seq_end
,
AlignBox
*
box_left
,
AlignBox
*
box_right
,
AlignBox
*
box_left
,
AlignBox
*
box_right
,
Cost
segment_cost
)
Cost
segment_cost
,
bool
reverse_V
,
bool
reverse_J
)
{
{
// Overlap size
// Overlap size
int
overlap
=
box_left
->
end
-
box_right
->
start
+
1
;
int
overlap
=
box_left
->
end
-
box_right
->
start
+
1
;
...
@@ -773,7 +773,7 @@ string check_and_resolve_overlap(string seq, int seq_begin, int seq_end,
...
@@ -773,7 +773,7 @@ string check_and_resolve_overlap(string seq, int seq_begin, int seq_end,
int
score_l
[
overlap
+
1
];
int
score_l
[
overlap
+
1
];
//LEFT
//LEFT