/ unpacks multi prediction array ; / prepare it for neighbors ; / align single prediction to endpoint ; / display preordered in table view ; %div.results %h3 Neighbors: / tabs div #tabs %ul.nav.nav-tabs.nav-justified{:id=>"neighborTabs", :role=>"tablist"} / each model a tab head ; - @models.each_with_index do |model,i| %li{:class => ("active" if i == 0)} %a{:href => "#results_#{i+1}", :id => "linkTab#{i+1}", data: {toggle:"tab"}} = "#{model.endpoint} (#{model.species})" %div.tab-content / unpack to single arrays - @predictions.each_with_index do |prediction,j| / pass model type for significant fragments view #results.tab-pane{:id=>"#{j+1}", :class => ("active" if j == 0)} / prepare dataset for neighbors table ; / delete first array which contains prediction ; / following arrays are the neighbor predictions ; / call the tablesorter plugin ; / presort by similarity ; :javascript $(document).ready(function(){ $("table##{j+1}").tablesorter({ debug: false, theme: "bootstrap", headerTemplate: '{content} {icon}', widgets: ['zebra', 'columns', 'uitheme', 'stickyHeaders'], widgetOptions: { stickyHeaders_attachTo : '.tab-content', stickyHeaders : '', stickyHeaders_offset : 0, stickyHeaders_cloneId : '-sticky', stickyHeaders_addResizeEvent : true, stickyHeaders_includeCaption : true, stickyHeaders_zIndex : 2, stickyHeaders_attachTo : null, stickyHeaders_xScroll : null, stickyHeaders_yScroll : null, stickyHeaders_filteredToTop: true }, headers: {0: {sorter: false}, 3: {sorter: false}}, sortList: [[2,1]], widthFixed: false }); }); - if prediction[:neighbors].size > 0 %div.table-responsive %table.tablesorter{:id=>"#{j+1}", :style=>"border-style: solid;"} %thead %tr %th{:style =>"vertical-align:middle;"} Compound %th{:style =>"vertical-align:middle;"} Measured Activity %th{:style =>"vertical-align:middle;"} Similarity / %th{:style =>"vertical-align:middle;"} / Supporting Information %span %tr %td %td{:style=>"font-size:x-small;padding:0px;"} / %a.btn.glyphicon.glyphicon-info-sign{:href=>"#neighbors", :title=>"Measured Activity", data: {toggle:"popover", placement:"auto", html:"true", content:"Experimental result(s) from the training dataset."}, :style=>"z-index:auto+10;"} %td{:style=>"font-size:x-small;padding:0px;"} / %a.btn.glyphicon.glyphicon-info-sign{:href=>"#neighbors", :title=>"Similarity", data: {toggle:"popover", placement:"auto", html:"true", content:"LAZAR calculates activity specific similarities based on the presence of statistically significant fragments. This procedure will