Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
tim authored and tim committed May 1, 2024
1 parent b781c41 commit a49855d
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 34 deletions.
2 changes: 0 additions & 2 deletions build/pedigreejs.v3.0.0-rc4.min.js

This file was deleted.

1 change: 0 additions & 1 deletion build/pedigreejs.v3.0.0-rc4.min.js.map

This file was deleted.

File renamed without changes.
25 changes: 18 additions & 7 deletions build/pedigreejs.v3.0.0-rc4.js → build/pedigreejs.v3.0.0-rc5.js
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,7 @@ var pedigreejs = (function (exports) {
};
let genetic_test1 = ['brca1', 'brca2', 'palb2', 'atm', 'chek2', 'rad51d', 'rad51c', 'brip1'];
let genetic_test2 = ['brca1', 'brca2', 'palb2', 'atm', 'chek2', 'bard1', 'rad51d', 'rad51c', 'brip1'];
let genetic_test4 = ['brca1', 'brca2', 'palb2', 'atm', 'chek2', 'bard1', 'rad51d', 'rad51c', 'brip1', 'hoxb13'];
let pathology_tests = ['er', 'pr', 'her2', 'ck14', 'ck56'];

// risk factor to storage
Expand Down Expand Up @@ -1491,22 +1492,31 @@ var pedigreejs = (function (exports) {
}
return meta;
}

/**
* Get genetic test genes based on CanRisk version
*/
function getGeneticTest(version) {
version = parseInt(version);
if (version === 1) return genetic_test1;else if (version === 2) return genetic_test2;else if (version === 3) return genetic_test2;
return genetic_test4;
}
function readCanRisk(boadicea_lines) {
let lines = boadicea_lines.trim().split('\n');
let ped = [];
let hdr = []; // collect risk factor header lines
const regexp = /([0-9])/;
let version = 2;
let gt = version === 1 ? genetic_test1 : genetic_test2;
let ncol = [26, 27, 27]; // number of columns - v1, v2, v3
let version = 3;
let gt = getGeneticTest(version);
let ncol = [26, 27, 27, 28]; // number of columns - v1, v2, v3, v4
// assumes two line header
for (let i = 0; i < lines.length; i++) {
let ln = lines[i].trim();
if (ln.indexOf("##") === 0) {
if (ln.indexOf("##CanRisk") === 0) {
const match = ln.match(regexp);
version = parseInt(match[1]);
gt = version === 1 ? genetic_test1 : genetic_test2;
gt = getGeneticTest(version);
console.log("CanRisk File Format version " + version);
if (ln.indexOf(";") > -1) {
// contains surgical op data
Expand Down Expand Up @@ -1611,7 +1621,7 @@ var pedigreejs = (function (exports) {
* Get CanRisk formated pedigree.
*/
function get_pedigree(dataset, famid, meta, isanon) {
let version = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 2;
let version = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 3;
let ethnicity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined;
let v = Number.isInteger(version) ? version + ".0" : version.toString();
let msg = "##CanRisk " + v;
Expand Down Expand Up @@ -1665,7 +1675,7 @@ var pedigreejs = (function (exports) {
msg += "\n##ethnicity=" + ethnicity;
}
msg += "\n##FamID\tName\tTarget\tIndivID\tFathID\tMothID\tSex\tMZtwin\tDead\tAge\tYob\tBC1\tBC2\tOC\tPRO\tPAN\tAshkn";
let gt = version === 1 ? genetic_test1 : genetic_test2;
let gt = getGeneticTest(version);
for (let i = 0; i < gt.length; i++) {
msg += "\t" + gt[i].toUpperCase();
}
Expand Down Expand Up @@ -1755,6 +1765,7 @@ var pedigreejs = (function (exports) {
cancers: cancers,
genetic_test1: genetic_test1,
genetic_test2: genetic_test2,
genetic_test4: genetic_test4,
get_mdensity: get_mdensity,
get_meta: get_meta,
get_non_anon_pedigree: get_non_anon_pedigree,
Expand Down Expand Up @@ -3596,7 +3607,7 @@ var pedigreejs = (function (exports) {
'type': 'prostate_cancer',
'colour': '#D5494A'
}],
labels: ['stillbirth', ['age', 'yob'], 'alleles', ['brca1_gene_test', 'brca2_gene_test', 'palb2_gene_test', 'chek2_gene_test', 'atm_gene_test'], ['rad51d_gene_test', 'rad51c_gene_test', 'brip1_gene_test'], ['er_bc_pathology', 'pr_bc_pathology', 'her2_bc_pathology', 'ck14_bc_pathology', 'ck56_bc_pathology']],
labels: ['stillbirth', ['age', 'yob'], 'alleles', ['brca1_gene_test', 'brca2_gene_test', 'palb2_gene_test', 'chek2_gene_test', 'atm_gene_test'], ['rad51d_gene_test', 'rad51c_gene_test', 'brip1_gene_test', 'hoxb13_gene_test'], ['er_bc_pathology', 'pr_bc_pathology', 'her2_bc_pathology', 'ck14_bc_pathology', 'ck56_bc_pathology']],
keep_proband_on_reset: false,
font_size: '.75em',
font_family: 'Helvetica',
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions build/pedigreejs.v3.0.0-rc5.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/pedigreejs.v3.0.0-rc5.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>

<script src="../build/pedigreejs.v3.0.0-rc4.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.js"></script>


<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions docs/example1.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example2.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example3.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example4.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example5.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example6.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example7.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example8.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
body {
Expand Down
4 changes: 2 additions & 2 deletions docs/example9.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc4.min.css" />
<link rel="stylesheet" href="../build/pedigreejs.v3.0.0-rc5.min.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="../build/pedigreejs.v3.0.0-rc5.min.js"></script>
<style>
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />

<link rel="stylesheet" href="build/pedigreejs.v3.0.0-rc4.css" />
<link rel="stylesheet" href="build/pedigreejs.v3.0.0-rc5.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>

<script src="build/pedigreejs.v3.0.0-rc4.min.js"></script>
<script src="build/pedigreejs.v3.0.0-rc5.min.js"></script>

<style>
a[href^="http://"][target=_blank]:after,
Expand Down
2 changes: 1 addition & 1 deletion index_es.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.min.css" rel="stylesheet" type="text/css" media="all" />
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="build/pedigreejs.v3.0.0-rc4.css" />
<link rel="stylesheet" href="build/pedigreejs.v3.0.0-rc5.css" />

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js" integrity="sha256-yUdn/lyl/rHBn4bD4HkKmnR7S6Fj+tXIO0ozSay1Bik=" crossorigin="anonymous"></script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pedigreejs",
"version": "v3.0.0-rc4",
"version": "v3.0.0-rc5",
"description": "pedigreejs is a javascript module for graphically building pedigree data in the web-browser.",
"browser": "es/pedigree.js",
"files": [
Expand Down

0 comments on commit a49855d

Please sign in to comment.