Personal tools

User:Serkan/test2/known2: Difference between revisions

From FANTOM5_SSTAR

Jump to: navigation, search
No edit summary
No edit summary
Line 6: Line 6:
</style>
</style>
<script type="text/javascript">
<script type="text/javascript">
 
var global_name="";
var motif_prefix="";
var sReturn ="";
var motif_id ="";
/* Formating function for row details */
/* Formating function for row details */


var global_name ="";
$(document).ready(function() {
$(document).ready(function() {
       $('#example').dataTable( {
       $('#example').dataTable( {
Line 21: Line 23:
{"0":"HOCOMOCO:LHX3_f1","1":"HOCOMOCO:LHX3_f1"},
{"0":"HOCOMOCO:LHX3_f1","1":"HOCOMOCO:LHX3_f1"},
{"0":"JASPAR:Nobox;MA0125.1","1":"JASPAR:Nobox;MA0125.1"},
{"0":"JASPAR:Nobox;MA0125.1","1":"JASPAR:Nobox;MA0125.1"},
{"0":"JASPAR:Nkx2-5","1":"JASPAR:Nkx2-5"}
{"0":"JASPAR:Nkx2-5;MA0063.1","1":"JASPAR:Nkx2-5;MA0063.1"}
         ],   
         ],   
           "aoColumns": [
           "aoColumns": [
             { "sTitle": "motif type","fnRender": function(obj) {
             { "sTitle": "motif type","fnRender": function(obj) {
                    var sReturn = obj.aData[ obj.iDataColumn ];
                      sReturn = obj.aData[ obj.iDataColumn ];
                               sReturn = sReturn.split(":");
                               sReturn = sReturn.split(":");
      return sReturn[0];
                              motif_prefix = sReturn[0];
      return motif_prefix ;
    }
    }
           },
           },
                        { "sTitle": "motif name", "fnRender": function ( obj ) {
            { "sTitle": "motif name", "fnRender": function ( obj ) {
var sReturn = obj.aData[ obj.iDataColumn ];
sReturn = obj.aData[ obj.iDataColumn ];
var SReturn_org = sReturn ;
var SReturn_org = sReturn ;
global_name=SReturn_org ;
var browser_link=global_name=SReturn_org ;
sReturn = sReturn.split(":");
sReturn = sReturn.split(":");
  return '<a href=/resource_browser/User:Serkan/test2/'+global_name+'>'+sReturn[1]+'</a>';}}
motif_prefix=sReturn[0];
motif_id = sReturn[1];
if(motif_prefix =="JASPAR"){
sReturn = sReturn[1].split(";");
motif_id = sReturn[1];
browser_link=motif_prefix +"_motif:"+motif_id;
}
  return '<a href=/resource_browser/'+browser_link+'>'+motif_id +'</a>';}}
,
,
  { "sTitle": "Sequence logos", "mData": 1, "mRender": function (data) {
  { "sTitle": "Sequence logos", "mData": 1, "mRender": function (data) {
Line 42: Line 52:
var SReturn_org = global_name;
var SReturn_org = global_name;
motif_prefix = SReturn_org .split(":")[0];
motif_prefix = SReturn_org .split(":")[0];
var motif_id=  SReturn_org .split(":")[1];
motif_id=  SReturn_org .split(":")[1];
if(motif_prefix = "HOCOMOCO"){
if(motif_prefix == "HOCOMOCO"){
number_prefix = "426";
number_prefix = "426";
}
}
else if(sReturn_prefix = "JASPAR"){
else if(motif_prefix == "JASPAR"){
number_prefix = "130";
number_prefix = "130";
motif_id= SReturn_org .split(":")[1].split(";")[1];
}
}
else if(motif_prefix = "HOMER"){
else if(motif_prefix == "HOMER"){
number_prefix = "138";
number_prefix = "138";
}
}
else if(motif_prefix = "SWISSREGULON"){
else if(motif_prefix == "SWISSREGULON"){
number_prefix = "190";
number_prefix = "190";
}
}
else if(motif_prefix = "UNIPROBE"){
else if(motif_prefix == "UNIPROBE"){
number_prefix = "413";
number_prefix = "413";
}
}
else if(motif_prefix = "ENCODE"){
else if(motif_prefix == "ENCODE"){
number_prefix = "683";
number_prefix = "683";
}
}
Line 65: Line 76:
  return '<img src="/resource_browser/seqlogos/' +motif_prefix+"/"+ motif_id+ '.png" width ="80" height = "20">'; }
  return '<img src="/resource_browser/seqlogos/' +motif_prefix+"/"+ motif_id+ '.png" width ="80" height = "20">'; }
  }
  }
                       ]   
                       ]   
       } );   
       } );   

Revision as of 17:40, 19 April 2013

known motifs