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,711
Issues
1,711
List
Boards
Labels
Service Desk
Milestones
Merge Requests
86
Merge Requests
86
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
31b2bd64
Commit
31b2bd64
authored
Nov 20, 2020
by
flothoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse & warning, add a new warning if clone have not same name between samples
Link to
#4566
parent
f6bb6e74
Pipeline
#188618
passed with stages
in 2 minutes and 24 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
0 deletions
+30
-0
doc/warnings.md
doc/warnings.md
+1
-0
tools/fuse.py
tools/fuse.py
+10
-0
tools/tests/data/warnings/w81_sample_1.vidjil
tools/tests/data/warnings/w81_sample_1.vidjil
+1
-0
tools/tests/data/warnings/w81_sample_2.vidjil
tools/tests/data/warnings/w81_sample_2.vidjil
+1
-0
tools/tests/should-get-tests/fuse_warnings.should-get
tools/tests/should-get-tests/fuse_warnings.should-get
+17
-0
No files found.
doc/warnings.md
View file @
31b2bd64
...
...
@@ -58,4 +58,5 @@ Warnings which were implemented ([x]) have a fixed code that should not be chang
## Comparisons between several samples or patients (such as with clonedb)
-
[ ] W8x Potential contamination or public clone #1744
-
[ ] Known public clone
-
[x] W81 Clone have different names between samples #4566
tools/fuse.py
View file @
31b2bd64
...
...
@@ -222,6 +222,16 @@ class Window:
if
key
not
in
obj
.
d
:
obj
.
d
[
key
]
=
source
.
d
[
key
]
# !! No name field if fuse with an empty clone
if
"name"
in
self
.
d
and
"name"
in
other
.
d
and
self
.
d
[
"name"
]
!=
other
.
d
[
"name"
]:
if
obj
.
d
[
"name"
]
==
self
.
d
[
"name"
]:
name
=
other
.
d
[
"name"
]
else
:
name
=
self
.
d
[
"name"
]
# init warn field if not already present
if
not
"warn"
in
obj
.
d
:
obj
.
d
[
"warn"
]
=
[]
obj
.
d
[
"warn"
].
append
(
{
"code"
:
"W81"
,
"msg"
:
"Clone have different names between samples: %s"
%
name
,
"level"
:
"warn"
})
return
obj
def
get_nb_reads
(
self
,
cid
,
point
=
0
):
...
...
tools/tests/data/warnings/w81_sample_1.vidjil
0 → 100644
View file @
31b2bd64
{"clones": [{"germline": "IGK", "id": "clone_1", "name": "clone_name_1", "reads": [500], "top": 1}, {"germline": "IGK", "id": "clone_3", "name": "clone_name_3", "reads": [500], "top": 2}], "clusters": [], "germlines": {}, "notes": "Sample with clone 1 and 3;", "producer": "vidjil fuse", "reads": {"germline": {"IGK": [9500]}, "segmented": [9500], "total": [9500]}, "samples": {"commandline": ["cmdline_1"], "log": ["log_1"], "number": 1, "original_names": ["seq_1"], "producer": ["vidjil-algo 2018.02"], "run_timestamp": ["2018-03-28 10:26:11"], "timestamp": ["2018-04-06 13:48:48"]}, "timestamp": "2019-04-08 15:18:00", "vidjil_json_version": "2016b", "warn": []}
tools/tests/data/warnings/w81_sample_2.vidjil
0 → 100644
View file @
31b2bd64
{"clones": [{"germline": "IGK", "id": "clone_1", "name": "clone_name_1", "reads": [500], "top": 1}, {"germline": "IGK", "id": "clone_2", "name": "clone_name_2", "reads": [500], "top": 2}, {"germline": "IGK", "id": "clone_3", "name": "clone_name_3b", "reads": [500], "top": 3}], "clusters": [], "germlines": {}, "notes": "Sample with clone 1-3; clone 3 have a variation in his name", "producer": "vidjil fuse", "reads": {"germline": {"IGK": [9500]}, "segmented": [9500], "total": [9500]}, "samples": {"commandline": ["cmdline_2"], "log": ["log_2"], "number": 1, "original_names": ["seq_2"], "producer": ["vidjil-algo 2018.02"], "run_timestamp": ["2018-03-28 10:26:11"], "timestamp": ["2018-04-06 13:48:48"]}, "timestamp": "2019-04-08 15:18:00", "vidjil_json_version": "2016b", "warn": []}
tools/tests/should-get-tests/fuse_warnings.should-get
0 → 100644
View file @
31b2bd64
!LAUNCH: python ../../fuse.py $FUSE_OPTIONS ../data/warnings/w81_sample_1.vidjil ../data/warnings/w81_sample_2.vidjil -o fuse_warnings.vidjil ; cat fuse_warnings.vidjil
$ Fuse the three files
2: ListWindows: .9500, 9500.
$ Middle file has the good 40-bp windows
1: "id": "clone_1"
1: "id": "clone_2"
1: "id": "clone_3"
$ fields 'warn' present 3 times (sample, clone, level)
1: "level": "warn"
$ Correct warning is present
1: W81
1: Clone have different names between samples: clone_name_3b
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment