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
dcb27fc7
Commit
dcb27fc7
authored
Oct 10, 2014
by
Marc Duez
Browse files
browser : replace window with id
parent
abbd7983
Changes
5
Hide whitespace changes
Inline
Side-by-side
browser/js/clone.js
View file @
dcb27fc7
...
...
@@ -54,7 +54,7 @@ Clone.prototype = {
return
this
.
name
;
}
}
else
{
return
this
.
window
;
return
this
.
id
;
}
},
//end getCode
...
...
@@ -356,7 +356,7 @@ Clone.prototype = {
}
html
+=
"
<tr><td> sequence </td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
sequence
+
"
</td></tr>
"
html
+=
"
<tr><td>
window
</td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
window
+
"
</td></tr>
"
html
+=
"
<tr><td>
id
</td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
id
+
"
</td></tr>
"
html
+=
"
<tr><td> 5 </td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
seg
[
"
5
"
]
+
"
</td></tr>
"
html
+=
"
<tr><td> 4 </td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
seg
[
"
4
"
]
+
"
</td></tr>
"
html
+=
"
<tr><td> 3 </td><td colspan='
"
+
time_length
+
"
'>
"
+
this
.
seg
[
"
3
"
]
+
"
</td></tr>
"
...
...
browser/js/list.js
View file @
dcb27fc7
...
...
@@ -403,7 +403,7 @@ List.prototype = {
var
div
=
this
.
index
[
list
[
i
]];
if
((
this
.
m
.
clone
(
list
[
i
]).
isActive
()
&&
this
.
m
.
clusters
[
list
[
i
]].
length
!=
0
)
||
this
.
m
.
clone
(
list
[
i
]).
window
==
"
other
"
)
{
if
((
this
.
m
.
clone
(
list
[
i
]).
isActive
()
&&
this
.
m
.
clusters
[
list
[
i
]].
length
!=
0
)
||
this
.
m
.
clone
(
list
[
i
]).
id
==
"
other
"
)
{
div
.
innerHTML
=
''
;
...
...
browser/js/model.js
View file @
dcb27fc7
...
...
@@ -137,7 +137,7 @@ Model.prototype = {
* @id : id of the form (html element) linking to the data file
* @analysis : id of the form (html element) linking to the analysis file
* impossible to use direct path to input files, need a fakepath from input form
* @limit : minimum top value to keep a
window
*/
* @limit : minimum top value to keep a
clone
*/
load
:
function
(
id
,
analysis
,
limit
)
{
var
self
=
this
;
...
...
@@ -271,12 +271,13 @@ Model.prototype = {
self
.
clones
.
push
(
clone
);
hash
++
}
self
.
mapID
[
self
.
clones
[
i
].
id
]
=
hash
;
}
// synthetic
window
// synthetic
clone
var
other
=
{
"
sequence
"
:
0
,
"
window
"
:
"
other
"
,
"
id
"
:
"
other
"
,
"
top
"
:
0
,
"
reads
"
:
[]
}
...
...
@@ -312,10 +313,6 @@ Model.prototype = {
self
.
system
=
germline_list
[
0
];
}
for
(
var
i
=
0
;
i
<
self
.
n_clones
;
i
++
)
{
self
.
mapID
[
self
.
clones
[
i
].
window
]
=
i
;
}
return
this
},
...
...
@@ -491,7 +488,7 @@ Model.prototype = {
if
(
n
>
n_max
)
{
n_max
=
n
;
}
self
.
mapID
[
clone
.
window
]
=
i
;
self
.
mapID
[
clone
.
id
]
=
i
;
this
.
clusters
[
i
]
=
[
i
]
clone
.
tag
=
default_tag
;
}
...
...
@@ -557,7 +554,7 @@ Model.prototype = {
var
id
=
-
1
var
f
=
1
;
//check if we have a clone with a similar
window
//check if we have a clone with a similar
id
if
(
typeof
c
[
i
].
id
!=
"
undefined
"
&&
typeof
this
.
mapID
[
c
[
i
].
id
]
!=
"
undefined
"
)
{
id
=
this
.
mapID
[
c
[
i
].
id
]
}
...
...
@@ -588,7 +585,7 @@ Model.prototype = {
max
.
id
=
id
}
}
else
{
myConsole
.
log
(
"
apply analysis : clones
"
+
c
[
i
].
window
+
"
> incorrect expected value
"
,
0
)
myConsole
.
log
(
"
apply analysis : clones
"
+
c
[
i
].
id
+
"
> incorrect expected value
"
,
0
)
}
}
else
{
if
(
typeof
(
c
[
i
].
tag
)
!=
"
undefined
"
)
{
...
...
@@ -625,7 +622,7 @@ Model.prototype = {
findWindow
:
function
(
sequence
)
{
if
(
sequence
!=
0
){
for
(
var
i
=
0
;
i
<
this
.
n_clones
;
i
++
){
if
(
sequence
.
indexOf
(
this
.
clone
(
i
).
window
)
!=
-
1
)
return
i
if
(
sequence
.
indexOf
(
this
.
clone
(
i
).
id
)
!=
-
1
)
return
i
}
}
return
-
1
...
...
@@ -674,7 +671,7 @@ Model.prototype = {
typeof
clone
.
expected
!=
"
undefined
"
)
{
var
elem
=
{};
elem
.
id
=
clone
.
window
;
elem
.
id
=
clone
.
id
;
elem
.
sequence
=
clone
.
sequence
;
if
(
typeof
clone
.
tag
!=
"
undefined
"
&&
clone
.
tag
!=
8
)
...
...
@@ -691,7 +688,7 @@ Model.prototype = {
if
(
this
.
clusters
[
i
].
length
>
1
)
{
var
elem
=
[];
for
(
var
j
=
0
;
j
<
this
.
clusters
[
i
].
length
;
j
++
)
{
elem
.
push
(
this
.
clone
(
this
.
clusters
[
i
][
j
]).
window
);
elem
.
push
(
this
.
clone
(
this
.
clusters
[
i
][
j
]).
id
);
}
analysisData
.
clusters
.
push
(
elem
);
}
...
...
@@ -1103,25 +1100,25 @@ Model.prototype = {
},
/* sépare un
e window
d'un cl
one
/* sépare un
clone
d'un cl
uster
*
* */
split
:
function
(
cl
oneID
,
window
ID
)
{
myConsole
.
log
(
"
split() (cloneA
"
+
cl
one
ID
+
"
windowB
"
+
window
ID
+
"
)
"
)
if
(
cl
one
ID
==
window
ID
)
return
split
:
function
(
cl
usterID
,
clone
ID
)
{
myConsole
.
log
(
"
split() (cloneA
"
+
cl
uster
ID
+
"
windowB
"
+
clone
ID
+
"
)
"
)
if
(
cl
uster
ID
==
clone
ID
)
return
var
nlist
=
this
.
clusters
[
cl
one
ID
];
var
index
=
nlist
.
indexOf
(
window
ID
);
var
nlist
=
this
.
clusters
[
cl
uster
ID
];
var
index
=
nlist
.
indexOf
(
clone
ID
);
if
(
index
==
-
1
)
return
nlist
.
splice
(
index
,
1
);
//le cl
one
retrouve sa liste de clones -1
this
.
clusters
[
cl
one
ID
]
=
nlist
;
//l
a window forme son propre clone a part
this
.
clusters
[
window
ID
]
=
[
window
ID
];
//le cl
uster
retrouve sa liste de clones -1
this
.
clusters
[
cl
uster
ID
]
=
nlist
;
//l
e clone forme un cluster de 1 clone
this
.
clusters
[
clone
ID
]
=
[
clone
ID
];
this
.
updateElem
([
window
ID
,
cl
one
ID
]);
this
.
updateElem
([
clone
ID
,
cl
uster
ID
]);
},
...
...
@@ -1184,7 +1181,7 @@ Model.prototype = {
},
active
:
function
(
id
)
{
if
(
this
.
clone
(
id
).
top
<=
this
.
top
&&
tagDisplay
[
this
.
clone
(
id
).
tag
]
==
1
&&
this
.
clone
(
id
).
window
!=
"
other
"
)
{
if
(
this
.
clone
(
id
).
top
<=
this
.
top
&&
tagDisplay
[
this
.
clone
(
id
).
tag
]
==
1
&&
this
.
clone
(
id
).
id
!=
"
other
"
)
{
this
.
clone
(
id
).
active
=
true
;
}
},
...
...
browser/js/pdf.js
View file @
dcb27fc7
...
...
@@ -194,7 +194,7 @@ PDF.prototype = {
polyline
.
setAttribute
(
"
stroke
"
,
color
);
}
if
(
m
.
clone
(
i
).
window
==
"
other
"
||
!
m
.
clone
(
i
).
isActive
())
{
if
(
m
.
clone
(
i
).
id
==
"
other
"
||
!
m
.
clone
(
i
).
isActive
())
{
polyline
.
parentNode
.
removeChild
(
polyline
);
}
}
...
...
@@ -426,7 +426,7 @@ PDF.prototype = {
}
}
else
{
this
.
doc
.
text
(
this
.
marge
+
20
,
this
.
y
,
"
segment fail :
"
+
m
.
clone
(
cloneID
).
window
);
this
.
doc
.
text
(
this
.
marge
+
20
,
this
.
y
,
"
segment fail :
"
+
m
.
clone
(
cloneID
).
id
);
}
this
.
y
+=
5
;
...
...
browser/js/segmenter.js
View file @
dcb27fc7
...
...
@@ -342,7 +342,7 @@ Segment.prototype = {
if
(
typeof
(
this
.
m
.
clone
(
list
[
i
]).
sequence
)
!=
'
undefined
'
&&
this
.
m
.
clone
(
list
[
i
]).
sequence
!=
0
)
request
+=
"
>
"
+
this
.
m
.
clone
(
list
[
i
]).
getName
()
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
sequence
+
"
\n
"
;
else
request
+=
"
>
"
+
this
.
m
.
clone
(
list
[
i
]).
getName
()
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
window
+
"
\n
"
;
request
+=
"
>
"
+
this
.
m
.
clone
(
list
[
i
]).
getName
()
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
id
+
"
\n
"
;
}
if
(
address
==
'
IMGT
'
)
imgtPost
(
request
,
this
.
m
.
system
);
...
...
@@ -375,7 +375,7 @@ Segment.prototype = {
if
(
typeof
(
this
.
m
.
clone
(
list
[
i
]).
sequence
)
!=
'
undefined
'
&&
this
.
m
.
clone
(
list
[
i
]).
sequence
!=
0
)
request
+=
"
>
"
+
list
[
i
]
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
sequence
+
"
\n
"
;
else
request
+=
"
>
"
+
list
[
i
]
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
window
+
"
\n
"
;
request
+=
"
>
"
+
list
[
i
]
+
"
\n
"
+
this
.
m
.
clone
(
list
[
i
]).
id
+
"
\n
"
;
}
...
...
@@ -466,7 +466,7 @@ Sequence.prototype = {
str
=
typeof
str
!==
'
undefined
'
?
str
:
this
.
m
.
clone
(
this
.
id
).
sequence
;
if
(
typeof
this
.
m
.
clone
(
this
.
id
).
sequence
==
'
undefined
'
||
this
.
m
.
clone
(
this
.
id
).
sequence
==
0
)
{
str
=
this
.
m
.
clone
(
this
.
id
).
window
str
=
this
.
m
.
clone
(
this
.
id
).
id
}
this
.
seq
=
str
.
split
(
""
)
...
...
@@ -520,8 +520,8 @@ Sequence.prototype = {
if
(
this
.
m
.
colorMethod
==
"
J
"
)
jColor
=
"
style='color :
"
+
clone
.
colorJ
+
"
'
"
;
//window
var
window_start
=
this
.
pos
[
clone
.
sequence
.
indexOf
(
clone
.
window
)]
var
window_end
=
this
.
pos
[
clone
.
sequence
.
indexOf
(
clone
.
window
)
+
clone
.
window
.
length
]
var
window_start
=
this
.
pos
[
clone
.
sequence
.
indexOf
(
clone
.
id
)]
var
window_end
=
this
.
pos
[
clone
.
sequence
.
indexOf
(
clone
.
id
)
+
clone
.
id
.
length
]
//add span VDJ
...
...
@@ -545,7 +545,7 @@ Sequence.prototype = {
result
+=
"
</span>
"
}
else
{
var
window_start
=
0
result
+=
clone
.
window
result
+=
clone
.
id
}
//marge
...
...
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