User:Serkan/test2/known3: Difference between revisions
From FANTOM5_SSTAR
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 */ | |||
$(document).ready(function() { | $(document).ready(function() { | ||
$('#example').dataTable( { | $('#example').dataTable( { | ||
Line 20: | 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) { | ||
sReturn = obj.aData[ obj.iDataColumn ]; | |||
sReturn = sReturn.split(":"); | sReturn = sReturn.split(":"); | ||
motif_prefix = sReturn[0]; | |||
return motif_prefix ; | |||
} | } | ||
}, | }, | ||
{ "sTitle": "motif name", "fnRender": function ( obj ) { | { "sTitle": "motif name", "fnRender": function ( obj ) { | ||
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 | 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 41: | Line 52: | ||
var SReturn_org = global_name; | var SReturn_org = global_name; | ||
motif_prefix = SReturn_org .split(":")[0]; | motif_prefix = SReturn_org .split(":")[0]; | ||
motif_id= SReturn_org .split(":")[1]; | |||
if(motif_prefix = "HOCOMOCO"){ | if(motif_prefix == "HOCOMOCO"){ | ||
number_prefix = "426"; | number_prefix = "426"; | ||
} | } | ||
else if( | 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 64: | 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">'; } | ||
} | } | ||
] | ] | ||
} ); | } ); |
Latest revision as of 17:41, 19 April 2013