From 76c1486ce5b94ca12eed10c625dff61be56a0796 Mon Sep 17 00:00:00 2001 From: Char-Al Date: Wed, 17 Jan 2024 11:36:39 +0100 Subject: [PATCH] Update GnomAD links --- seal/templates/analysis/sample.html | 37 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/seal/templates/analysis/sample.html b/seal/templates/analysis/sample.html index 64b5068..9074feb 100644 --- a/seal/templates/analysis/sample.html +++ b/seal/templates/analysis/sample.html @@ -474,8 +474,7 @@

Comments ()

mobidetails = ' MD MobiDetails
' } franklin = ' F Franklin '; - gnomad = ' G GnomAD '; - return "
" + mobidetails + franklin + "
" + gnomad + "
"; + return "
" + mobidetails + franklin + "
"; } } }, @@ -701,41 +700,47 @@

Comments ()

}, {% endfor %} { - className: 'showTitle', - data: "annotations.gnomADg_AF", + className: '', + // data: "annotations.gnomADg_AF", + data: null, render : { _: function ( data, type, row, meta ) { - if(data != null) { - if (isNaN(parseFloat(data).toFixed(6))) { + if(data["annotations"]["gnomADg_AF"] != null) { + if (isNaN(parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(6))) { return null } - return parseFloat(data).toFixed(6); + return parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(6); } else { return null; } }, display: function ( data, type, row, meta ) { - if(data != null) { - if (isNaN(parseFloat(data).toFixed(6))) { + if(data["annotations"]["gnomADg_AF"] != null) { + if (isNaN(parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(6))) { return "NA" } - gnomad = parseFloat(data); + gnomad = parseFloat(data["annotations"]["gnomADg_AF"]); if (gnomad > 0.01) { - response = parseFloat(data).toFixed(4) + response = parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(4) } else { - response = parseFloat(data).toExponential(2) + response = parseFloat(data["annotations"]["gnomADg_AF"]).toExponential(2) } - return "" + response + ""; + gnomad_r = ' '+ response+' '; + gnomad1 = ' E '; + gnomad2 = ' 2 '; + gnomad3 = ' 3 '; + gnomad4 = ' 4 '; + return '' + gnomad_r + ' (v2.1)
' + gnomad1+ gnomad2+ gnomad3+ gnomad4; } else { return "NA"; } }, sort: function ( data, type, row, meta ) { - if(data != null) { - if (isNaN(parseFloat(data).toFixed(6))) { + if(data["annotations"]["gnomADg_AF"] != null) { + if (isNaN(parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(6))) { return -0.5 } - return parseFloat(data).toFixed(6); + return parseFloat(data["annotations"]["gnomADg_AF"]).toFixed(6); } else { return -1 }