Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,695
Issues
1,695
List
Boards
Labels
Service Desk
Milestones
Merge Requests
88
Merge Requests
88
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
3109af79
Commit
3109af79
authored
Nov 20, 2020
by
marc duez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
screen_mrd.js : regroup screen_mrd functions in an object and extend clone prototype with it
parent
5b372f16
Pipeline
#188588
passed with stages
in 19 minutes and 5 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
110 deletions
+121
-110
browser/js/app.js
browser/js/app.js
+3
-1
browser/js/screen_MRD.js
browser/js/screen_MRD.js
+118
-109
No files found.
browser/js/app.js
View file @
3109af79
...
...
@@ -84,7 +84,6 @@ function loadAfterConf() {
"
../tips
"
,
"
../tokeniser
"
,
"
../indexedDom
"
,
"
../screen_MRD
"
,
// Speed test
"
../speed_test
"
,
"
../form_builder
"
,
...
...
@@ -92,6 +91,7 @@ function loadAfterConf() {
"
../vidjil_vmi
"
,
"
../../test/QUnit/testFiles/data_test
"
,
],
function
(){
if
(
typeof
main
==
"
undefined
"
){
require
([
"
../main
"
]);
}
else
{
...
...
@@ -100,6 +100,8 @@ function loadAfterConf() {
if
(
typeof
config
.
addons
!==
"
undefined
"
)
{
require
(
config
.
addons
);
}
require
([
"
../screen_MRD
"
]);
})
})
},
...
...
browser/js/screen_MRD.js
View file @
3109af79
...
...
@@ -36,10 +36,15 @@ UNIVERSAL_FAMILY = "UNI"
UNIVERSAL_COEFF
=
'
UNI_COEFF
'
UNIVERSAL_R2
=
'
UNI_R2
'
/**
function
ScreenMRD
()
{}
ScreenMRD
.
prototype
=
{
/**
* @return {string} the family used for fiting at the given time
*/
Clone
.
prototype
.
getFittingFamily
=
function
(
time
)
{
getFittingFamily
:
function
(
time
)
{
if
(
this
.
m
.
mrd
.
prevalent
[
time
]
==
0
)
{
// diagnostic sample
return
""
;
...
...
@@ -49,13 +54,13 @@ Clone.prototype.getFittingFamily = function(time) {
// negative clone: report UNI
return
UNIVERSAL_FAMILY
;
}
};
},
/**
/**
* @return {string} the normalization coefficient at the given time
*/
Clone
.
prototype
.
getNormCoeff
=
function
(
time
)
{
getNormCoeff
:
function
(
time
)
{
if
(
this
.
m
.
mrd
.
prevalent
[
time
]
==
0
)
{
// diagnostic sample
return
""
;
...
...
@@ -67,12 +72,12 @@ Clone.prototype.getNormCoeff = function(time) {
}
else
{
return
""
;
}
};
},
/**
/**
* @return {string} the Pearson R2 value for the spike-in fitting at the given time
*/
Clone
.
prototype
.
getR2
=
function
(
time
)
{
getR2
:
function
(
time
)
{
if
(
this
.
m
.
mrd
.
prevalent
[
time
]
==
0
)
{
// diagnostic sample
return
""
;
...
...
@@ -84,27 +89,27 @@ Clone.prototype.getR2 = function(time) {
}
else
{
return
""
;
}
};
},
/**
/**
* @return {string} the prevalent germline at the given time
*/
Clone
.
prototype
.
getPrevalent
=
function
(
time
)
{
getPrevalent
:
function
(
time
)
{
if
(
this
.
m
.
mrd
.
prevalent
[
time
]
==
0
)
{
// diagnostic sample
return
""
;
}
else
{
return
this
.
m
.
mrd
.
prevalent
[
time
];
}
};
},
/**
/**
* @return {string} the amplification coefficient at the given time
* (ampl. coeff. = total prevalent / total spike)
*/
Clone
.
prototype
.
getAmplCoeff
=
function
(
time
)
{
getAmplCoeff
:
function
(
time
)
{
if
(
this
.
m
.
mrd
.
prevalent
[
time
]
==
0
)
{
// diagnostic sample
return
""
;
...
...
@@ -113,13 +118,13 @@ Clone.prototype.getAmplCoeff = function(time) {
}
else
{
return
"
Please use version 6 or later of spike-normalization
"
;
}
};
},
/**
/**
* Return info about a sequence/clone in html
*/
Clone
.
prototype
.
getHtmlInfo_prevalent
=
function
()
{
getHtmlInfo_prevalent
:
function
()
{
values
=
[]
if
(
'
mrd
'
in
this
)
{
...
...
@@ -156,4 +161,8 @@ Clone.prototype.getHtmlInfo_prevalent = function () {
}
return
values
};
}
}
Clone
.
prototype
=
$
.
extend
(
Object
.
create
(
ScreenMRD
.
prototype
),
Clone
.
prototype
);
\ No newline at end of file
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