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
b088b0a2
Commit
b088b0a2
authored
Apr 05, 2017
by
Mathieu Giraud
Browse files
js/clone.js: light refactor, extract '.getCluster()'
parent
2688fa4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/clone.js
View file @
b088b0a2
...
...
@@ -316,8 +316,8 @@ Clone.prototype = {
* @return {string} name
* */
getName
:
function
()
{
if
(
this
.
m
.
c
luster
s
[
this
.
index
]
.
name
){
return
this
.
m
.
c
luster
s
[
this
.
index
]
.
name
;
if
(
this
.
getC
luster
()
.
name
){
return
this
.
getC
luster
()
.
name
;
}
else
if
(
this
.
c_name
)
{
return
this
.
c_name
;
}
else
if
(
this
.
name
)
{
...
...
@@ -382,10 +382,12 @@ Clone.prototype = {
},
//fin changeName,
/**
* @return {integer} cluster number
*/
getCluster
:
function
()
{
return
this
.
m
.
clusters
[
this
.
index
]
},
/**
* compute the clone size ( ratio of all clones clustered ) at a given time
...
...
@@ -637,7 +639,7 @@ Clone.prototype = {
time
=
this
.
m
.
getTime
(
time
)
var
result
=
0
;
var
cluster
=
this
.
m
.
c
luster
s
[
this
.
index
]
var
cluster
=
this
.
getC
luster
()
for
(
var
j
=
0
;
j
<
cluster
.
length
;
j
++
)
{
result
+=
this
.
m
.
clone
(
cluster
[
j
]).
reads
[
time
];
}
...
...
@@ -831,7 +833,7 @@ Clone.prototype = {
this
.
color
=
""
;
}
else
if
(
this
.
m
.
colorMethod
==
"
abundance
"
)
{
var
size
=
this
.
getSize
()
if
(
this
.
m
.
c
luster
s
[
this
.
index
]
.
length
==
0
){
size
=
this
.
getSequenceSize
()
}
if
(
this
.
getC
luster
()
.
length
==
0
){
size
=
this
.
getSequenceSize
()
}
if
(
size
==
0
){
this
.
color
=
""
;
}
else
{
...
...
@@ -1016,7 +1018,7 @@ Clone.prototype = {
*
* */
getHtmlInfo
:
function
()
{
var
isCluster
=
this
.
m
.
c
luster
s
[
this
.
index
]
.
length
var
isCluster
=
this
.
getC
luster
()
.
length
var
time_length
=
this
.
m
.
samples
.
order
.
length
var
html
=
""
...
...
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