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
b2b22602
Commit
b2b22602
authored
Feb 10, 2015
by
Mathieu Giraud
Committed by
Vidjil Team
Feb 11, 2015
Browse files
js/axis.js, js/scatterPlot.js: axis 'clone length'
parent
4468c3f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
browser/js/axis.js
View file @
b2b22602
...
...
@@ -140,6 +140,39 @@ Axis.prototype = {
},
/*
*
* */
useSequenceLength
:
function
()
{
this
.
init
()
var
self
=
this
;
var
n_min
=
9999
;
var
n_max
=
1
;
for
(
var
i
=
0
;
i
<
this
.
m
.
clones
.
length
;
i
++
){
var
n
=
this
.
m
.
clone
(
i
).
getSequenceLength
();
if
(
n
&&
n
<
n_min
)
n_min
=
n
;
if
(
n
>
n_max
)
n_max
=
n
;
}
this
.
sizeScale
=
d3
.
scale
.
linear
()
.
domain
([
n_min
-
1
,
n_max
+
1
])
.
range
([
0
,
1
]);
//clone position
this
.
pos
=
function
(
cloneID
)
{
return
1
-
self
.
sizeScale
(
self
.
m
.
clone
(
cloneID
).
getSequenceLength
())
}
//labels
var
h
=
Math
.
ceil
(
n_max
/
5
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pos
=
1
-
this
.
sizeScale
(
h
*
i
);
var
text
=
h
*
i
this
.
labels
.
push
(
this
.
label
(
"
line
"
,
pos
,
text
));
}
},
/*
*
* */
...
...
browser/js/scatterPlot.js
View file @
b2b22602
...
...
@@ -105,6 +105,7 @@ function ScatterPlot(id, model) {
[
"
allele_v
"
,
"
allele V
"
],
[
"
allele_j
"
,
"
allele J
"
],
[
"
Size
"
,
"
abundance
"
],
[
"
sequenceLength
"
,
"
clone length
"
],
[
"
n
"
,
"
N length
"
]
];
...
...
@@ -1620,6 +1621,9 @@ ScatterPlot.prototype = {
if
(
splitMethod
==
"
Size
"
)
{
axis
.
useSize
()
}
if
(
splitMethod
==
"
sequenceLength
"
)
{
axis
.
useSequenceLength
()
}
if
(
splitMethod
==
"
n
"
)
{
axis
.
useNlength
()
}
...
...
Vidjil Team
@vidjilteam
Mentioned in issue
#1422 (closed)
·
Nov 29, 2016
Mentioned in issue
#1422 (closed)
Mentioned in issue #1422
Toggle commit list
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