Browse Transcription Factors hg19: Difference between revisions
From FANTOM5_SSTAR
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
|?GeneID | |?GeneID | ||
|?Symbol | |?Symbol | ||
|?Associated jaspar id | |||
|?Description | |?Description | ||
|format=array | |format=array | ||
Line 11: | Line 12: | ||
|propsep=/ | |propsep=/ | ||
|limit= | |limit= | ||
|manysep= | |manysep=! | ||
|recordsep=<RCRD> | |recordsep=<RCRD> | ||
}} | }} | ||
}} | }} | ||
{{#vardefine:db_content}} | {{#vardefine:db_content}} | ||
{{#arraydefine:geneids_array|{{#var:geneids_content}}|:}} | {{#arraydefine:geneids_array|{{#var:geneids_content}}|:}} | ||
{{ | {{ | ||
#loop: j | #loop: j | ||
Line 24: | Line 27: | ||
{{#vardefine:ID|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|0 }} }} | {{#vardefine:ID|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|0 }} }} | ||
{{#vardefine:Symbol|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|1 }} }} | {{#vardefine:Symbol|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|1 }} }} | ||
{{#vardefine:Description|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/| | {{#vardefine:MotifId|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|2 }} }} | ||
{{#vardefine:Description|{{#explode:{{#arrayindex:geneids_array| {{#var:j}} }}|/|3 }} }} | |||
{{#vardefine:PeakCount|{{#ask: [[Category:FFCP]][[EntrezGene::{{#var:ID}}]]|format=count}}}} | {{#vardefine:PeakCount|{{#ask: [[Category:FFCP]][[EntrezGene::{{#var:ID}}]]|format=count}}}} | ||
{{#arraydefine: defined_array{{#var:j}} |{{#var:ID}}/{{#var:Symbol}}/{{#var:Description}}/{{#var:PeakCount}}}} | {{#arraydefine: defined_array{{#var:j}} |{{#var:ID}}/{{#var:Symbol}}/{{#var:MotifId}}/{{#var:Description}}/{{#var:PeakCount}}}} | ||
{{#vardefine:db_content|{{#arrayprint:defined_array{{#var:j}} }}:{{#var:db_content}} }} | {{#vardefine:db_content|{{#arrayprint:defined_array{{#var:j}} }}:{{#var:db_content}} }} | ||
Line 36: | Line 40: | ||
<style type="text/css" title="currentStyle"> | <style type="text/css" title="currentStyle"> | ||
@import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css"; | @import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css"; | ||
@import "/resource_browser/rb_js/datatables/extras/TableTools/media/css/TableTools.css"; | |||
.ImageBorder | |||
{ | |||
border:1px solid lightgrey; | |||
width : 90px; | |||
height : 20px; | |||
} | |||
</style> | </style> | ||
<script type="text/javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.min.js"></script> | <script type="text/javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.min.js"></script> | ||
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/ZeroClipboard.js"></script> | |||
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.js"> | |||
</script> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
var content = ""; | var content = ""; | ||
var m_data = {}; | var m_data = {}; | ||
m_data.content = []; | m_data.content = []; | ||
$(document).ready(function() { | $(document).ready(function() { | ||
content= "</html>{{#var:db_content}}<html>"; | content= "</html>{{#var:db_content}}<html>"; | ||
var content_array = content.split(":"); | |||
for(i=0;i<content_array.length-1;i++){ | |||
var temp = content_array[i]; | |||
var temp_array =temp.split("/"); | |||
var mot_id=""; | |||
if(temp_array[2].length> 0){ mot_id=temp_array[2];}else{mot_id="NA";} | |||
m_data.content.push({EntrezGene:'<a href=/resource_browser/EntrezGene:'+temp_array[0]+'>'+temp_array[0]+'</a>', Symbol:temp_array[1],MotifId:mot_id,Description:temp_array[3],PeakCount:temp_array[4]}); | |||
} | } | ||
var oTable = $('#tf_table').dataTable( { | var oTable = $('#tf_table').dataTable( { | ||
"bProcessing": true, | "bProcessing": true, | ||
"iDisplayLength":25, | "iDisplayLength":25, | ||
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], | "aLengthMenu": [[10,25,50, -1], [10,25,50, "All"]], | ||
"bScrollCollapse": true, | "bScrollCollapse": true, | ||
"bPaginate": true, | "bPaginate": true, | ||
"bFilter": true, | "bFilter": true, | ||
"bInfo": true, | "bInfo": true, | ||
"bJQueryUI": | "bAutoWidth": false, | ||
"aaSorting": [[ | "bJQueryUI": false, | ||
"aaSorting": [[ 2, "asc" ]], | |||
"aaData": m_data.content, | "aaData": m_data.content, | ||
"aoColumns":[ | "aoColumns":[ | ||
{"mData": "EntrezGene","sTitle": "EntrezGene"}, | {"mData": "EntrezGene","sTitle": "EntrezGene"}, | ||
{"mData": "Symbol","sTitle": "Symbol"}, | {"mData": "Symbol","sTitle": "Symbol"}, | ||
{"mData": "MotifId","sTitle":"Associated Motif", | |||
"fnRender": function( obj ) { | |||
var motid = obj.aData.MotifId; | |||
if(motid == "NA"){ | |||
return_val= "NA"; | |||
}else{ | |||
var splitted = motid.split("!"); | |||
if(splitted!=null) | |||
{ | |||
if(splitted.length>1) | |||
{ | |||
var return_val="" | |||
for(i=0;i<splitted.length;i++) | |||
return_val='<a href=\"/resource_browser/'+"JASPAR_Motif:"+splitted[i]+'\"><img src=\"/resource_browser/seqlogos/jaspar/' + splitted[i] + '.png" class="ImageBorder" alt="'+splitted[i]+'">'+'</a>' +return_val; | |||
} | |||
else{ | |||
return_val='<a href=\"/resource_browser/'+"JASPAR_Motif:"+obj.aData.MotifId+'\"><img src="/resource_browser/seqlogos/jaspar/' + obj.aData.MotifId + '.png" class="ImageBorder" alt="'+obj.aData.MotifId+'">'+'</a>'; | |||
} | |||
} | |||
else | |||
{ | |||
return_val= "NA" | |||
} | |||
} | |||
return return_val | |||
} | |||
}, | |||
{"mData": "Description","sTitle": "Description"}, | {"mData": "Description","sTitle": "Description"}, | ||
{"mData": "PeakCount","sTitle": " | {"mData": "PeakCount","sTitle": "#of peaks"} | ||
] | ] | ||
} ); | } ); | ||
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"} ]}); | 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 ); | $('#export_tool').before( oTableTools.dom.container ); | ||
Line 90: | Line 131: | ||
<span id="export_tool"></span> | <span id="export_tool"></span> | ||
</html> | </html> | ||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="tf_table"> | <table cellpadding="0" cellspacing="0" border="0" class="display" id="tf_table"> | ||
</table> | </table> |
Revision as of 15:12, 17 April 2014
Human transcription factors