Skip to content

Commit

Permalink
nciatwp-878: implement glossary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
park-brian committed Mar 9, 2018
1 parent 7bdabfb commit beb6677
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local.properties
.classpath
.settings/
.loadpath
common

# External tool builders
.externalToolBuilders/
Expand Down
7 changes: 2 additions & 5 deletions biomarkerTools/biomarkerTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
from sampleSize.sampleSize import *

from flask import Flask, url_for
app = Flask(__name__, static_folder='', static_url_path='/')
app = Flask(__name__, static_folder='', static_url_path='')

@app.route('/')
@app.route('/biomarkerToolsRest')
def index():
return render_template('index.html')

def api_tool_calls():
return 'List of calls: '
return app.send_static_file('index.html')

@app.route('/ping/', strict_slashes=False)
def ping():
Expand Down
15 changes: 10 additions & 5 deletions biomarkerTools/glossary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$.extend($_Glossary,{
AUC : {
fullName : "Area under the receiver operator characteristic curve",
definition : " for a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis."
fullName : "Area under the receiver operator characteristic curve (AUC)",
definition : "Area under the receiver operator characteristic curve (AUC) for a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis. For a binary biomarker with Youden’s index J, the AUC = (1+J)/2 (this AUC formula is used by Mean Risk Stratification).",
glossaryDefinition : "For a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis. For a binary biomarker with Youden’s index J, the AUC = (1+J)/2 (this AUC formula is used by Mean Risk Stratification)."
},
cNPV : {
fullName : "Complement of Negative Predictive Value (cNPV)",
Expand Down Expand Up @@ -41,15 +42,15 @@ $.extend($_Glossary,{
},
max_mrs: {
fullName: "Maximum possible MRS for a disease with this prevalence",
definition: "Maximum possible MRS for a disease with this prevalence. Formula: max risk strat=2q(1-q)."
definition: "Denoting disease prevalence as q, MRS=2q(1-q)J, where J is Youden’s index. MRS is maximized when J=1. Thus the maximum MRS is 2q(1-q). Youden’s index is the fraction of maximum risk stratification for the disease that is achieved by the biomarker."
},
m_neg: {
fullName: "Marker Negativity (M-)",
definition: "Negative test result for biomarker test."
},
mrs: {
fullName: "Mean Risk Stratification (MRS)",
definition: "Average change in pretest-posttest disease risk. Formula: MRS=2(ad-bc), where a,b,c,d are the joint probabilities inside a 2x2 table."
definition: "MRS is the average difference between predicted post-test individual risk and population-average (pre-test) risk. Simply, MRS is the average change in risk revealed by the test. Formula: MRS=2(ad-bc), where a,b,c,d are the joint probabilities inside a 2x2 table."
},
nnr: {
fullName: "Number Needed to Recruit",
Expand Down Expand Up @@ -115,7 +116,11 @@ $.extend($_Glossary,{
Spec : {
fullName : "Specificity",
definition : "Specificity is the proportion whose biomarker test is negative (below the threshold) among those without disease."
}
},
Youden: {
fullName: "Youden's Index",
definition: "Youden's index (J) is the sum of sensitivity and specificity, minus 1. Denoting disease prevalence as q, MRS=2q(1-q)J, and thus Youden’s index is also the fraction of maximum risk stratification for the disease that is achieved by the biomarker."
}
});
$.extend($_Glossary, {
cnpv: $_Glossary.cNPV,
Expand Down
4 changes: 3 additions & 1 deletion biomarkerTools/help/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ $(document).ready(function(){
keys = keys.sort();
for (var index in keys) {
index = keys[index];
$("<p><b>" + terms[index].fullName + ":</b><span> " + terms[index].definition + "</span></p>").appendTo(glossary);
$("<p><b>" + terms[index].fullName + ":</b><span> " +
(terms[index].glossaryDefinition || terms[index].definition) +
"</span></p>").appendTo(glossary);
}
});

Expand Down
2 changes: 1 addition & 1 deletion biomarkerTools/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions biomarkerTools/src/app/pug/pages/meanRiskStratification.pug
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@
td.r_diff_result.output_field.bm_3
tr
td.text-left
| Youden's Index (YI)
a.define(href="javascript:void(0);", data-term="Youden") Youden's Index (J)
td.youden_result.output_field.bm_1
td.youden_result.output_field.bm_2
td.youden_result.output_field.bm_3
tr
td.text-left
a.define(href="javascript:void(0);", data-term="AUC") AUC = (1+YI)/2
a.define(href="javascript:void(0);", data-term="AUC") AUC = (1+J)/2
td.auc_result.output_field.bm_1
td.auc_result.output_field.bm_2
td.auc_result.output_field.bm_3
15 changes: 10 additions & 5 deletions biomarkerTools/src/app/scripts/glossary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$.extend($_Glossary,{
AUC : {
fullName : "Area under the receiver operator characteristic curve",
definition : " for a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis."
fullName : "Area under the receiver operator characteristic curve (AUC)",
definition : "Area under the receiver operator characteristic curve (AUC) for a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis. For a binary biomarker with Youden’s index J, the AUC = (1+J)/2 (this AUC formula is used by Mean Risk Stratification).",
glossaryDefinition : "For a biomarker is the average sensitivity (or, equivalently, the integral of the sensitivity) in the interval of cSpecificity from 0 to 1 (specificity from 1 to 0), itself equal to the area between the ROC curve and the x-axis. For a binary biomarker with Youden’s index J, the AUC = (1+J)/2 (this AUC formula is used by Mean Risk Stratification)."
},
cNPV : {
fullName : "Complement of Negative Predictive Value (cNPV)",
Expand Down Expand Up @@ -41,15 +42,15 @@ $.extend($_Glossary,{
},
max_mrs: {
fullName: "Maximum possible MRS for a disease with this prevalence",
definition: "Maximum possible MRS for a disease with this prevalence. Formula: max risk strat=2q(1-q)."
definition: "Denoting disease prevalence as q, MRS=2q(1-q)J, where J is Youden’s index. MRS is maximized when J=1. Thus the maximum MRS is 2q(1-q). Youden’s index is the fraction of maximum risk stratification for the disease that is achieved by the biomarker."
},
m_neg: {
fullName: "Marker Negativity (M-)",
definition: "Negative test result for biomarker test."
},
mrs: {
fullName: "Mean Risk Stratification (MRS)",
definition: "Average change in pretest-posttest disease risk. Formula: MRS=2(ad-bc), where a,b,c,d are the joint probabilities inside a 2x2 table."
definition: "MRS is the average difference between predicted post-test individual risk and population-average (pre-test) risk. Simply, MRS is the average change in risk revealed by the test. Formula: MRS=2(ad-bc), where a,b,c,d are the joint probabilities inside a 2x2 table."
},
nnr: {
fullName: "Number Needed to Recruit",
Expand Down Expand Up @@ -115,7 +116,11 @@ $.extend($_Glossary,{
Spec : {
fullName : "Specificity",
definition : "Specificity is the proportion whose biomarker test is negative (below the threshold) among those without disease."
}
},
Youden: {
fullName: "Youden's Index",
definition: "Youden's index (J) is the sum of sensitivity and specificity, minus 1. Denoting disease prevalence as q, MRS=2q(1-q)J, and thus Youden’s index is also the fraction of maximum risk stratification for the disease that is achieved by the biomarker."
}
});
$.extend($_Glossary, {
cnpv: $_Glossary.cNPV,
Expand Down
4 changes: 3 additions & 1 deletion biomarkerTools/src/app/scripts/help/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ $(document).ready(function(){
keys = keys.sort();
for (var index in keys) {
index = keys[index];
$("<p><b>" + terms[index].fullName + ":</b><span> " + terms[index].definition + "</span></p>").appendTo(glossary);
$("<p><b>" + terms[index].fullName + ":</b><span> " +
(terms[index].glossaryDefinition || terms[index].definition) +
"</span></p>").appendTo(glossary);
}
});

Expand Down

0 comments on commit beb6677

Please sign in to comment.