Template:EntrezGene: Difference between revisions
From FANTOM5_SSTAR
No edit summary |
No edit summary |
||
Line 56: | Line 56: | ||
== TSS expression == | == TSS expression == | ||
< | <html> | ||
{{ | <script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.js"></script> | ||
< | <script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.min.js"></script> | ||
<tr>< | <script type="text/javascript" language="javascript" src="/resource_browser/rb_js/flot/jquery.flot.min.js"></script> | ||
< | |||
<style type="text/css" title="currentStyle"> | |||
<table class=" | @import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css"; | ||
@import "/resource_browser/rb_js/datatables/extras/TableTools/media/css/TableTools.css"; | |||
.highlight { background-color: yellow } | |||
.dataTables_scrollHeadInner tr { | |||
vertical-align:bottom; | |||
align:left; | |||
height:100px; | |||
} | |||
.rotate90 p { | |||
-webkit-transform: rotate(-90deg); | |||
-moz-transform: rotate(-90deg); | |||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); | |||
width:1px | |||
} | |||
</style> | |||
<script type="text/javascript"> | |||
$(document).ready(function() { | |||
var oTable = $('.entrezene_explist').dataTable({ | |||
"sScrollY": "300px", | |||
"bScrollCollapse": true, | |||
"iDisplayLength": -1, | |||
"aLengthMenu": [[10, 25, 100, -1], [10, 25, 100, "All"]], | |||
"aoColumnDefs": [ { "asSorting": [ "desc", "asc" ], "aTargets": [ "_all" ] } , { "bSortable": false, "aTargets": [ 0 ] }], | |||
"aaSorting": [[ 1, "desc" ]] | |||
}); | |||
var oTableTools = new TableTools( oTable, {"sSwfPath": "/resource_browser/rb_js/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf", "aButtons": [ {"sExtends": "copy", "mColumns": "visible"}, {"sExtends": "csv", "mColumns": "visible"}, {"sExtends": "pdf", "mColumns": "visible"} ]}); | |||
$('#export_tool').before( oTableTools.dom.container ); | |||
var data = []; | |||
var plotdata = []; | |||
// chart checkbox | |||
//$("#test").text(""); | |||
for (var i2=1; i2<$("#dynamic tr")[0].cells.length; i2++){ | |||
//var t1 = oTable.fnSettings().aoColumns[i2].sTitle.replace('class="rotate90"', ''); | |||
var t1 = oTable.fnSettings().aoColumns[i2].sTitle.replace(/<(?:.|\n)*?>/gm, '').replace(/(^\s+)|(\s+$)/g, ""); | |||
key2 = i2-1; | |||
$("#chart_chkbox").append('<input type="checkbox" name="' + key2 + | |||
'" checked="checked" id="id' + key2 + '"><label for="id' + key2 + '">' | |||
+ t1+ '</label><br/>'); | |||
// + $('.dataTables_scrollHeadInner tr')[0].cells[i2].innerText + '</label>'); | |||
} | |||
function collectdata(){ | |||
data = []; | |||
for (var i2=1; i2<$("#dynamic tr")[0].cells.length; i2++){ | |||
var plots = []; | |||
for (var i1=1; i1<$('#dynamic tr').length; i1++) { | |||
plots.push([i1,$("#dynamic tr")[i1].cells[i2].innerHTML]); | |||
} | |||
data.push({"label": oTable.fnSettings().aoColumns[i2].sTitle.replace(/<(?:.|\n)*?>/gm, '').replace(/(^\s+)|(\s+$)/g, ""), "data": plots}); | |||
} | |||
} | |||
function drawchart(){ | |||
plotdata = []; | |||
$("#chart_chkbox").find("input:checked").each(function () { | |||
var key = $(this).attr("name"); | |||
plotdata.push(data[$(this).attr("name")]); | |||
}); | |||
var plot1 = $.plot($("#placeholder"), plotdata, { | |||
yaxis : { axisLabel : 'TPM' }, | |||
lines : { show : false }, | |||
points : { show : true }, | |||
grid: { hoverable: true, clickable: true }, | |||
xaxis : { tickDecimals : 0, show: false }, | |||
legend: { show: false } | |||
// legend: { show: true, container: $("#legends")} | |||
}); | |||
//test | |||
var data_series = plot1.getData(); | |||
$("#chart_chkbox label").css("background-color", "white"); | |||
$.each(data_series , function(){ | |||
$("#chart_chkbox label:contains(" + this.label + ")").css("background-color", this.color); | |||
}); | |||
//$('div.rotate90:eq(1)').css("background-color", testseries[0].color); | |||
//$('.dataTables_scrollHeadInner tr:nth-child(2n)').css("background-color", testseries[0].color); | |||
//$('.dataTables_scrollHeadInner tr')[0].cells[1].innerText("text"); | |||
} | |||
collectdata(); | |||
drawchart(); | |||
// re-draw chart event | |||
$("th").click(function() {collectdata(); drawchart(); } ); | |||
$("#dynamic_paginate").click(function() {collectdata(); drawchart(); } ); | |||
$('#dynamic').bind('filter', function() { | |||
setTimeout(function(){ | |||
collectdata(); drawchart();}, 1000); | |||
} ); | |||
$('#dynamic_length').change(function() {collectdata(); drawchart(); } ); | |||
$("#chart_chkbox").find("input").click(function() { drawchart(); }); | |||
// tooltip function start | |||
function showTooltip(x, y, contents) { | |||
$('<div id="tooltip">' + contents + '</div>').css( { | |||
position: 'absolute', | |||
display: 'none', | |||
top: y + 5, | |||
left: x + 5, | |||
border: '1px solid #aaa', | |||
padding: '2px', | |||
'background-color': '#fff', | |||
opacity: 0.80 | |||
}).appendTo("body").fadeIn(200); | |||
} | |||
var previousPoint = null; | |||
$("#placeholder").bind("plothover", function (event, pos, item) { | |||
$("#x").text(pos.x.toFixed(2)); | |||
$("#y").text(pos.y.toFixed(2)); | |||
if (item) { | |||
if (previousPoint != item.dataIndex) { | |||
previousPoint = item.dataIndex; | |||
$("#tooltip").remove(); | |||
//var gtest1 = oTable._('tr:eq('+ item.dataIndex +')', {"filter": "applied"})[0][0]; | |||
var x = item.datapoint[0].toFixed(0), | |||
y = item.datapoint[1].toFixed(2); | |||
showTooltip(item.pageX, item.pageY, | |||
"Gene: "+ item.series.label +"<br>TPM: "+y); | |||
// "Gene: "+ item.series.label +"<br>Sample: "+ gtest1 +"<br>TPM: "+y); | |||
//test | |||
//$("#test").css("background-color", item.series.color); | |||
} | |||
} | |||
else { | |||
$("#tooltip").remove(); | |||
previousPoint = null; | |||
} | |||
}); | |||
// tooltip function end | |||
// clicking point function | |||
$("#placeholder").bind("plotclick", function (event, pos, item) { | |||
if (item){ | |||
var vdata = Math.round($('#dynamic').height())/item.series.data.length*item.dataIndex; | |||
//var vdata = 600; | |||
$('#dynamic_wrapper .dataTables_scrollBody').animate({ scrollTop: vdata-150 }, 'slow'); | |||
$("#dynamic_wrapper .dataTables_scrollBody tbody td").removeClass('highlight'); | |||
$('#dynamic_wrapper .dataTables_scrollBody tbody tr:eq(' + item.dataIndex+ ') td').addClass('highlight'); | |||
} | |||
}); | |||
// clicking point function end | |||
} ); | |||
</script> | |||
</html> | |||
<span id="export_tool"></span> | |||
<table class="entrezene_explist" id="dynamic"><html><thead></html> | |||
<tr> | <tr> | ||
<th | <th>sample</th> | ||
<th | <th><div class="rotate90"><p> | ||
{{#ask:[[Category:FFCP]][[EntrezGene::{{{GeneID}}} | {{#ask:[[Category:FFCP]][[EntrezGene::{{{GeneID}}}]]|?id|?short_description|limit=100|format=template|template=Entrezgene_cpphase1_exptable_header_{{#switch:{{{tax_id}}}|9606=hg19|10090=mm9}}|sep=</p></div></th><th><div class="rotate90"><p>}} | ||
</th> | </p></div></th> | ||
</tr> | </tr><html></thead><tbody></html> | ||
{{# | {{#exptable_{{#switch:{{{tax_id}}}|9606=hg19|10090=mm9}}: | ||
{{#ask:[[Category:FFCP]][[EntrezGene::{{{GeneID}}} | {{#ask:[[Category:FFCP]][[EntrezGene::{{{GeneID}}}]] | ||
|?Phase1 expression | |?Phase1 expression | ||
|limit=100 | |limit=100 | ||
Line 79: | Line 260: | ||
}} | }} | ||
}} | }} | ||
< | <html></tbody></html></table> | ||
</table> | <br><br> | ||
<html> | |||
< | <div id="placeholder" style="float:left;width:90%;height:300px;"></div> | ||
<div id="chart_chkbox" style="float:left;"></div> | |||
< | <div style="clear:both;"></div> | ||
< | |||
</html> | |||
< | |||
< | |||
</ | |||
== Details == | == Details == |
Revision as of 17:33, 27 July 2012
Symbol: | {{{Symbol}}} |
---|---|
Description: | {{{description}}} |
Synonyms: | |
Species: | |
External refs: | EntrezGene:{{{GeneID}}} |
Associated motifs: | |
TSS regions: |
View on UCSC genome browser OSC local mirror
Mouse over to see Genome browser image, Click image to go to Genome browser
{{#ucsc_link:{{#entre_id_pos:{{{GeneID}}}}}|https://fantom5-collaboration.gsc.riken.jp/ucsc/}}
TSS expression
{{#exptable_: }}
sample |
|
---|
Details
GeneID: | {{{GeneID}}} |
---|---|
LocusTag: | {{{LocusTag}}} |
chromosome: | {{{chromosome}}} |
map location: | |
type of gene: | {{{type_of_gene}}} |
Symbol from nomenclature authority: | {{{Symbol_from_nomenclature_authority}}} |
Full name from nomenclature authority: | {{{Full_name_from_nomenclature_authority}}} |
Nomenclature status: | {{{Nomenclature_status}}} |
Other designations: | |
Modification date: | {{{Modification_date}}} |
transcription factor: | {{{transcription_factor}}} |