Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
e3b9f5b5
Commit
e3b9f5b5
authored
Oct 14, 2014
by
Marc Duez
Browse files
c++ : segment.cpp : segmenter store germline used
update json output for 2014.10.10 format
parent
c853dbf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
algo/core/segment.cpp
View file @
e3b9f5b5
...
...
@@ -230,7 +230,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, MultiGermline *multigermline)
// removeChevauchement is called once info was already computed: it is only to output info_extra
info_extra
+=
removeChevauchement
();
finishSegmentation
();
system
=
germline
->
code
;
return
;
}
}
// end for (Germlines)
...
...
@@ -725,31 +725,30 @@ JsonList FineSegmenter::toJsonList(Germline *germline){
result
.
add
(
"sequence"
,
revcomp
(
sequence
,
reversed
)
);
if
(
isSegmented
())
{
result
.
add
(
"name"
,
code_short
);
result
.
add
(
"Jstart"
,
Jstart
);
result
.
add
(
"Nlength"
,
(
del_V
+
del_J
+
seg_N
.
size
())
);
result
.
add
(
"Vend"
,
Vend
);
JsonArray
jsonV
;
JsonArray
jsonJ
;
// TODO: what is going on if some list is smaller than JSON_REMEMBER_BEST ?
for
(
int
i
=
0
;
i
<
JSON_REMEMBER_BEST
;
i
++
)
jsonV
.
add
(
germline
->
rep_5
.
label
(
score_V
[
i
].
second
)
)
;
result
.
add
(
"V"
,
jsonV
);
JsonList
seg
;
// TODO: what is going on if some list is smaller than JSON_REMEMBER_BEST ?
JsonArray
jsonV
;
for
(
int
i
=
0
;
i
<
JSON_REMEMBER_BEST
;
i
++
)
jsonV
.
add
(
germline
->
rep_5
.
label
(
score_V
[
i
].
second
)
)
;
seg
.
add
(
"5"
,
jsonV
);
seg
.
add
(
"5start"
,
0
);
seg
.
add
(
"5end"
,
Vend
);
if
(
score_D
.
size
()
>
0
){
result
.
add
(
"Dstart"
,
Dstart
);
result
.
add
(
"Dend"
,
Dend
);
JsonArray
jsonD
;
for
(
int
i
=
0
;
i
<
JSON_REMEMBER_BEST
;
i
++
)
jsonD
.
add
(
germline
->
rep_4
.
label
(
score_D
[
i
].
second
)
)
;
result
.
add
(
"D"
,
jsonD
);
result
.
add
(
"4"
,
jsonD
);
result
.
add
(
"4start"
,
Dstart
);
result
.
add
(
"4end"
,
Dend
);
}
JsonArray
jsonJ
;
for
(
int
i
=
0
;
i
<
JSON_REMEMBER_BEST
;
i
++
)
jsonJ
.
add
(
germline
->
rep_3
.
label
(
score_J
[
i
].
second
)
)
;
result
.
add
(
"J"
,
jsonJ
);
seg
.
add
(
"3"
,
jsonJ
);
seg
.
add
(
"3start"
,
Jstart
);
result
.
add
(
"seg"
,
seg
);
}
return
result
;
}
...
...
algo/core/segment.h
View file @
e3b9f5b5
...
...
@@ -54,7 +54,7 @@ protected:
string
info_extra
;
// .vdj.fa header, other information, at the end of the header
int
best_V
,
best_J
;
int
del_V
,
del_D_left
,
del_D_right
,
del_J
;
string
seg_V
,
seg_N
,
seg_J
;
string
seg_V
,
seg_N
,
seg_J
,
system
;
int
best_D
;
string
seg_N1
,
seg_D
,
seg_N2
;
...
...
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