Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,432
Issues
1,432
List
Boards
Labels
Milestones
Merge Requests
50
Merge Requests
50
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
bf9f517c
Commit
bf9f517c
authored
Sep 27, 2018
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: get_mutations, keep previous tests, without end codons
parent
aba08aca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
browser/js/segmenter.js
browser/js/segmenter.js
+1
-1
browser/js/tools.js
browser/js/tools.js
+3
-2
No files found.
browser/js/segmenter.js
View file @
bf9f517c
...
...
@@ -1299,7 +1299,7 @@ genSeq.prototype= {
ref
=
this
.
segmenter
.
sequence
[
this
.
segmenter
.
first_clone
].
seq
;
}
if
(
this
.
segmenter
.
aligned
)
{
mutations
=
get_mutations
(
ref
,
seq
,
reference_phase
);
mutations
=
get_mutations
(
ref
,
seq
,
reference_phase
,
true
);
}
var
i_am_first_clone
=
(
this
.
id
==
this
.
segmenter
.
first_clone
)
...
...
browser/js/tools.js
View file @
bf9f517c
...
...
@@ -87,7 +87,7 @@ function get_codons(ref, seq, frame) {
* @return a dictionary whose keys are positions of mutations / end of codons in the alignment
* and whose values are a combinations of SUBST/SILENT/INS/DEL/END_CODON
*/
function
get_mutations
(
ref
,
seq
,
frame
)
{
function
get_mutations
(
ref
,
seq
,
frame
,
with_end_codon
)
{
var
codons
=
get_codons
(
ref
,
seq
,
frame
);
var
mutations
=
{};
var
nb_pos
=
0
;
...
...
@@ -128,7 +128,8 @@ function get_mutations(ref, seq, frame) {
}
nb_pos
++
;
}
mutations
[
nb_pos
-
1
]
=
END_CODON
+
(
typeof
mutations
[
nb_pos
-
1
]
===
'
undefined
'
?
''
:
mutations
[
nb_pos
-
1
])
if
(
typeof
with_end_codon
!==
undefined
&&
with_end_codon
)
mutations
[
nb_pos
-
1
]
=
END_CODON
+
(
typeof
mutations
[
nb_pos
-
1
]
===
'
undefined
'
?
''
:
mutations
[
nb_pos
-
1
])
}
return
mutations
;
}
...
...
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