comparison js/profileCLs.js @ 1:b5453d07f740 draft default tip

"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flow_overview commit 65373effef15809f3db0e5f9603ef808f4110aa3"
author azomics
date Wed, 29 Jul 2020 17:03:53 -0400
parents
children
comparison
equal deleted inserted replaced
0:8283ff163ba6 1:b5453d07f740
1 // Copyright (c) 2016 Northrop Grumman.
2 // All rights reserved.
3
4 var cl_table = './CLprofiles.txt';
5 var scores_table = './scores.txt';
6
7 var displayCLTable = function(){
8 d3.text(cl_table, function(error, data){
9 var clHdgs = [],
10 clHTML = '<table id="cltable" class="display compact" cellspacing="0" width="100%"/>',
11 clTableData = [],
12 clHeadings = [];
13
14 if (error){
15 alert("Problem retrieving data");
16 return;
17 }
18 clHdgs = data.split("\n")[0].split("\t");
19 data = d3.tsv.parse(data);
20 clTableData = $.extend(true, [], data);
21
22 clHdgs.forEach(function(d,i){
23 clHeadings.push({"data" : d, "title" : d});
24 });
25
26 $('#clprofiles').html(clHTML);
27 var clTable = $('#cltable').DataTable({
28 columns: clHeadings,
29 dom: '<"top"Bi>t<"bottom"lp><"clear">',
30 pageLength: 25,
31 order: [[ 0, "asc" ]],
32 data: clTableData,
33 buttons: [
34 'copy', 'pdfHtml5','csvHtml5'
35 ],
36 columnDefs: [
37 {
38 targets: [0,2,3],
39 className: "smallcols"
40 },
41 {
42 targets: 4,
43 className: "dt-body-left"
44 },
45 {
46 targets: [5,6],
47 className: "firstcol"
48 }]
49 });
50 });
51 };
52
53 var displayScoresTable = function(){
54 d3.text(scores_table, function(error, data){
55 var scoreHTML = '<table id="scoretable" class="display compact" cellspacing="0" width="100%"/>',
56 scoreHdgs = [],
57 scoreTableData = [],
58 scoreHeadings = [];
59 if (error){
60 alert("Problem retrieving data");
61 return;
62 }
63 scoreHdgs = data.split("\n")[0].split("\t");
64 data = d3.tsv.parse(data);
65
66 $('#scores').html(scoreHTML);
67
68 scoreTableData = $.extend(true, [], data);
69
70 scoreHdgs.forEach(function(d,i){
71 scoreHeadings.push({"data" : d, "title" : d});
72 });
73
74 var scoreTable = $('#scoretable').DataTable({
75 columns: scoreHeadings,
76 pageLength: 25,
77 order: [[ 0, "asc" ]],
78 dom: '<"top"Bi>t<"bottom"lp><"clear">',
79 data: scoreTableData,
80 buttons: [
81 'copy', 'pdfHtml5','csvHtml5'
82 ],
83 });
84 });
85 };