Commit ab95592c authored by flothoni's avatar flothoni

tools/test; add some test on fuse

Test the capacity to compute distribution on all clones before top cutting
Test the capacity to return rounded distribution axe
Update an assert
Link to #3978
parent 588a503d
Pipeline #95621 passed with stages
in 8 minutes
......@@ -5,7 +5,7 @@
}],
"clones": [ {
"_average_read_length": [
76.0
76.123
],
"_coverage": [
0.973684191703796
......@@ -75,7 +75,7 @@
},
{
"_average_read_length": [
76.0
76.956
],
"_coverage": [
1.0
......@@ -145,7 +145,7 @@
},
{
"_average_read_length": [
76.0
76.5
],
"_coverage": [
1.0
......
......@@ -21,8 +21,8 @@ $ Get correct file name in original_names field and distributions
2:"/some/file_1"
2:"/some/file_2"
$ should have two time 'distributions' (console log + into vidjil file)
2:distributions
$ should have two time 'distributions' (into vidjil file)
1:distributions
$ Axis title should be present 122 times (2*60+1/file)
......
......@@ -98,3 +98,75 @@ $ Filenames (original_files and repname)
###################################################
### Part with real clones, control top to keep ##
###################################################
!LAUNCH: python3 ../../fuse.py -t 3 -d germline,seg5 --no-clones --output fused_distribution_top.vidjil ../../../algo/tests/data/results_five_segmented_clones.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil; cat fused_distribution_top.vidjil
$ Top clones; Get correct keys for distributions json content
1:"repertoires"
1:"keys"
1:"filters"
$ Top clones; Get correct files names (original_files, commandline and repname)
3:sequence_file
$ Top clones; Get correct files names (original_files and repname)
2:"/some/file_1"
$ Top clones; Case of an entire result with top idem (axes: germline, seg5)
lr1:"values": { "IGK": { .* "IGKV3-20\*01": \[ 1, 3898 \]
lr1:"values": { "IGK": { .* "IGKV1-39\*01": \[ 1, 5653 \]
lr1:"values": { "IGK": { .* "IGKV1-33\*01": \[ 1, 2597 \]
lr1:"values": { "IGK": { .* "IGKV4-1\*01": \[ 1, 2520 \]
lr1:"values": { "IGK": { .* "IGKV3-15\*01": \[ 1, 2502 \]
$ Case for the other files (axes: germline, seg5)
lr1:"values": { "IGH": { "\?": \[ 2, 900 \]
######################################################
### Part with real clones, distribution with 3 axes ##
######################################################
!LAUNCH: python3 ../../fuse.py -d germline,seg5,seg3 --no-clones --output fused_3_axes.vidjil ../../../algo/tests/data/results_five_segmented_clones.vidjil ../../../algo/tests/data/results-two-clones-1-2.vidjil; cat fused_3_axes.vidjil
$ 3 axes; Correct number of entries for some keys (1 by repertoire): seg5
2:"seg5"
$ 3 axes; Correct number of entries for some keys (1 by repertoire+sample): germline
3:"germline"
$ 3 axes; Get correct files names
:sequence_file
$ 3 axes; Filenames (original_files and repname)
2:"sequence_file"
2:"/some/file_1"
$ Top clones; Case of an entire result with top idem (axes: germline, seg5, seg3)
lr1:"values": { "IGK": { .* "IGKV3-20\*01": { .* "IGKJ2\*01": \[ 1, 3898 \]
lr1:"values": { "IGK": { .* "IGKV1-39\*01": { .* "IGKJ2\*01": \[ 1, 5653 \]
$ Case for the two cloness files (axes: germline, seg5, seg3)
lr1:"values": { "IGH": { "\?": { "\?": \[ 2, 900 \]
#################################################
### Part with real clones, test rounded axis ##
#################################################
!LAUNCH: python3 ../../fuse.py -d lenSeqAverage -d unknow_AXIS --no-clones --output fused_rounded_axes.vidjil ../../../algo/tests/data/results_five_segmented_clones.vidjil; cat fused_rounded_axes.vidjil
$ Rounded values: 76.123 (should not be present)
0:"76.123"
$ Rounded values: 76.0
1:"76.0"
$ Rounded values: 77.0
1:"77.0"
\ No newline at end of file
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