Personal tools

User:Serkan/test5: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
mNo edit summary
mNo edit summary
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Loading|loadingimage=sprites.gif}}<html>
TEST PAGE TO DISPLAY MOUSE TRANSCRIPTION FACTORS PAGE
<script type="text/javascript" src="/resource_browser/rb_js/datatables/media/js/jquery.dataTables.min.js"></script>
<hr>
<script type="text/javascript" src="/resource_browser/rb_js/datatables/media/js/datatables.sortdefs.js"></script>
 
{{Loading|loadingimage=sprites.gif}}{{#vardefine:geneids_content|{{#ask:[[Category:EntrezGene]][[tax_id::9606]][[tf?::true]]
|?GeneID
|?Symbol
|?Associated motif id
|?Description
|format=array
|headers=hide
|sort=Symbol
|order=DESC
|mainlabel=-
|sep=?
|propsep=/
|limit=
|manysep=!
|recordsep=&lt;RCRD&gt;
}}
}}
{{#vardefine:db_content}}
 
{{#arraydefine:geneids_array|{{#var:geneids_content}}|?}}
 
{{
  #loop: j
  | 0         
  | {{#arraysize:geneids_array}}
  | <nowiki/>
{{#vardefine:ID|{{#explode:{{#arrayindex:geneids_array|{{#var:j}}}}|/|0}}}}
{{#vardefine:Symbol|{{#explode:{{#arrayindex:geneids_array|{{#var:j}}}}|/|1}}}}
{{#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}}}}
 
{{#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}}  }}
 
}}
==Mouse transcription factors==
 
<html>
<style type="text/css" title="currentStyle">
@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>
<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/ZeroClipboard.js"></script>
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.js">
<script type="text/javascript" language="javascript" src="/resource_browser/rb_js/datatables/extras/TableTools/media/js/TableTools.js">
</script>
</script>
<style type="text/css" title="currentStyle">
<script type="text/javascript">
@import "/resource_browser/rb_js/datatables/media/css/jquery.dataTables.css";
            var content = "";
@import "/resource_browser/rb_js/datatables/extras/TableTools/media/css/TableTools.css";
            var m_data = {};
td.bgwhite { background-color: white};
            m_data.content = [];
</style>
 
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
                    content= "</html>{{#var:db_content}}<html>";
    jaspar_motif_table = $('.jaspar_motif_list').dataTable({
 
                    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( {
                 "bProcessing": true,
                 "bProcessing": true,
                 "iDisplayLength":25,
                 "iDisplayLength":25,
                 "aLengthMenu": [[25, 50, -1], [25, 50, "All"]],
                 "aLengthMenu": [[10,25,50, -1], [10,25,50, "All"]],
                 "bScrollCollapse": false,
                 "bScrollCollapse": true,
"bPaginate": true,
"bPaginate": true,
"bFilter": true,
"bFilter": true,
"bInfo": true,
"bInfo": true,
                 "bAutoWidth": false,  
                 "bAutoWidth": false,  
"aoColumnDefs": [ { "sType": "num-html", "aTargets": [0] }, { "fnRender": function(obj) {
                "bJQueryUI": false,
return sReturn = '<img src="/resource_browser/seqlogos/jaspar/' +  $(obj.aData[1]).text() + '.png" style="width:80px;height:20px;border:1px solid lightgrey;">'}, "sClass": "bgwhite", "sWidth": "80", "bSortable": true, "aTargets": [1] },{ "bSortable": true, "aTargets": [2] }]
                "aaSorting": [[ 2, "asc" ]],
});
                "aaData": m_data.content,
                "aoColumns":[
                                {"mData": "EntrezGene","sTitle": "EntrezGene"},
                                {"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++) {
                if (splitted[i].toString().indexOf("JASPAR_motif") >= 0) {
                    return_val = '<a href=\"/resource_browser/' + splitted[i] + '\"><img src=\"/resource_browser/seqlogos/jaspar/' + splitted[i].split(":")[1] + '.png"  class="ImageBorder" alt="' + splitted[i] + '">' + '</a>' + return_val;
                } else if (splitted[i].toString().indexOf("Swissregulon") >= 0) {
                    /*return_val = '<a href=\"/resource_browser/'+ splitted[i] + '\"><img src=\"/resource_browser/seqlogos/' + replaceAll(splitted[i].split(":")[1]," ","_") + '.png" class="ImageBorder"  alt="' + splitted[i] + '">' + '</a>' + return_val;*/
return_val = "";
                }
                else{
                    return_val = "";
                }
            }
        } else {
            if (splitted[0].toString().indexOf("JASPAR_motif") >= 0) {
                return_val = '<a href=\"/resource_browser/' + splitted[0] + '\"><img src=\"/resource_browser/seqlogos/jaspar/' + splitted[0].split(":")[1] + '.png"  class="ImageBorder" alt="' + splitted[0] + '">' + '</a>' ;
            } else if (splitted[0].toString().indexOf("Swissregulon") >= 0) {
 
              /* return_val = '<a href=\"/resource_browser/' + splitted[0] + '\"><img src=\"/resource_browser/seqlogos/' + replaceAll(splitted[0].split(":")[1]," ","_") + '.png"  class="ImageBorder"  alt="' + splitted[0] + '">' + '</a>' ;*/
return_val = "";
            }
            else{
                    return_val = "";
                }
        }
    } else {
        return_val = "NA"
    }
}


$('.dataTables_scrollBody').css("resize", "vertical");
return return_val
}
                                },
                                {"mData": "Description","sTitle": "Description"},  
                                {"mData": "PeakCount","sTitle": "#of peaks"}
                                ]
} );


jaspar_motif_table_tools = new TableTools( jaspar_motif_table, {"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"} ]});


$('#jaspar_motif_export_tool').before( jaspar_motif_table_tools.dom.container );
$('#export_tool').before( oTableTools.dom.container );


});
 
</script>
} );
<span id = "jaspar_motif_export_tool"></span>
 
function replaceAll(str, token, newtoken) {
    if(token!=newtoken)
    while(str.indexOf(token) > -1) {
        str = str.replace(token, newtoken);
    }
    return str;
}
</script>
<span id="export_tool"></span>
</html>
</html>
{{#ask:[[Category:JASPAR_motif]]|mainlabel=JASPAR ID|?=Logo|?name=name|format=ttable|class=jaspar_motif_list|limit=1100|searchlabel=}}
 
<table cellpadding="0" cellspacing="0" border="0" class="display" id="tf_table"> 
</table>

Latest revision as of 10:19, 10 July 2014

TEST PAGE TO DISPLAY MOUSE TRANSCRIPTION FACTORS PAGE




Mouse transcription factors