5 <p id="trial_jbrowse_check">[loading...]</p>
9 my $project_name = lc($c->config->{project_name});
10 my $test_url = "/jbrowse_$project_name/current/data/json/trials/" . $trial_id . "/trackList.json";
11 my $jbrowse_url = "/jbrowse/?data=data%2Fjson%2Ftrials%2F" . $trial_id ."&tracks=DNA%2CGene%20exons%2C&cat=Diversity/NEXTGEN/Imputed&highlight=";
15 <script type="text/javascript" defer="defer">
16 jQuery(document).ready(function () {
19 function prepareJbrowse () { //ajax function to test for existence of given jbrowse trial url
22 url: "<% $test_url %>",
24 200: function () { // if page is found, create and display link
25 jQuery('#trial_jbrowse_check').replaceWith('<a id="jbrowse_link" href="<% $jbrowse_url %>">View the vcf tracks for this trial in JBrowse</a>');
27 404: function () { // if page not found, display message that jbrowse instance wasn't found
28 jQuery('#trial_jbrowse_check').html(" <i>No Jbrowse instance found for this trial</i>.");