IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
bmtable Class Reference

Detailed Description

BioMarker Table.

This is old code that is still in use for its ability to draw the "Peak Location" plots

It was originally a class to facilitate biomarker comparison between different datasets/methods. It can draw the "grades" curves (e.g. loadings, p-values, feature frequency histograms) and Peak Location Plots thereof.

It needs a lot of setup to work, so it is probably better to use draw_loadings_pl.m instead. The classes vis_loadings and have an option to visualize loadings/grades vectors as "Peak Location" plots vis_log_grades

If want to use this class directly, use demo_bmtable.m as a template to perform the following settings:

  1. Assign blocks, datasets, peakdetectors, arts, units, and data_hint (optional)
  2. Setup the grid property
  3. Call draw_pl() or draw_lines()
See also
draw_loadings_pl.m, demo_bmtable.m

Definition at line 22 of file bmtable.m.

Public Member Functions

function bmtable ()
 
function check_booted (in o)
 
function boot (in o)
 
function draw_lines (in o, in i_row)
 
function draw_pl (in o, in flag_wntext, in flag_sig)
 Draws the Peak Locations (PL) plot. More...
 

Public Attributes

Property grid
 
Property datasets
 
Property blocks
 Cell of block objects. More...
 
Property peakdetectors
 Cell of peakdetector objects. More...
 
Property arts
 Cell of bmart objects. More...
 
Property units
 Cell of bmunit objects. More...
 
Property sig_j
 Vector of indexes. As many elements as grid rows. Each element is the index of a grid column. More...
 
Property sig_threshold
 Significance level. Maybe the granularity of this will change (doubt it). More...
 
Property rowname_j
 Vector of indexes. As many elements as grid rows. Each element is the index of a grid column. More...
 
Property rowname_type
 ='dataset'. May be 'dataset' or 'block' More...
 
Property colname_type
 ='dataset'. May be 'dataset' or 'block' More...
 
Property data_hint
 Used to draw the hint spectrum. More...
 
Property linewidth
 =3.5 Width for lineas and markers. Note that this number will be actually multiplied by the global SCALE. More...
 
Property flag_train
 =0. Whether or not to train the blocks More...
 

Protected Member Functions

function draw_line (in o, in i, in j, in stuff)
 
function draw_significance (in o, in cel, in yy)
 
function shake_grid (in o)
 
function calc_cols (in o)
 
function make_legend (in o, in ll)
 
function add_legend (in o, in i, in j, in ll)
 Checks if new (block, params) case is found; if not, adds case. More...
 
function get_rowname (in o, in i)
 
function get_initialblock (in o, in cel)
 
function get_grades (in o, in cel)
 
function get_grades_x (in o, in cel)
 
function get_gradeslegend (in o, in cel)
 Grades legend for cell. More...
 

Protected Attributes

Property rowdata
 Row-wise information. More...
 
Property coldata
 Column-wise information. More...
 
Property flag_reverse
 Whether the x-axis is reverse or not. More...
 
Property flag_booted
 
Property flag_data
 

Constructor & Destructor Documentation

function bmtable::bmtable ( )

Member Function Documentation

function bmtable::add_legend ( in  o,
in  i,
in  j,
in  ll 
)
protected

Checks if new (block, params) case is found; if not, adds case.

function bmtable::boot ( in  o)
function bmtable::calc_cols ( in  o)
protected

Calculations before draw_lines()

First pass finds minima and maxima for each column across all rows. This will ensure that all draw_lines() (using one row only) will nevertheless use y-scales that will be the same for any row wich which draw_lines() is called.

Second pass will transfer the minima and maxima to absolute graphical coordinates, as I am not using subplots, but drawing the figure from scratch instead

function bmtable::check_booted ( in  o)
function bmtable::draw_line ( in  o,
in  i,
in  j,
in  stuff 
)
protected

Draws a line an updates 'stuff' structure. This structure contains yticks, yticklabels, handles for legends and legend texts

function bmtable::draw_lines ( in  o,
in  i_row 
)

Draws all the grades curves from one row of the grid

This function draws the grades for each item of one given row of the bmtable::grid. Each grade is drawn separately, creating a multi-panel figure; however, it does not use sub-plots; instead, it draws the whole figure from scratch in one single box-less plot area.

function bmtable::draw_pl ( in  o,
in  flag_wntext,
in  flag_sig 
)

Draws the Peak Locations (PL) plot.

function bmtable::draw_significance ( in  o,
in  cel,
in  yy 
)
protected
function bmtable::get_grades ( in  o,
in  cel 
)
protected

fcon_linear

Sensitive to "idx_fea"=1 and "flag_abs"=1 in params

function bmtable::get_grades_x ( in  o,
in  cel 
)
protected
function bmtable::get_gradeslegend ( in  o,
in  cel 
)
protected

Grades legend for cell.

Backwards, calls of get_L_fea_names(), then sequence of get_description calls

others: makes default with idx_fea and flag_abs

function bmtable::get_initialblock ( in  o,
in  cel 
)
protected
function bmtable::get_rowname ( in  o,
in  i 
)
protected
function bmtable::make_legend ( in  o,
in  ll 
)
protected

Makes legends: plots the markers then calls the legend() function passing the appropriate handles to it.

Currently used only by the PL plot. draw_lines() does not use it

function bmtable::shake_grid ( in  o)
protected

Empowers grid with calculated fields

grid.params

Grid cell parameters have defaults "idx_fea"=1 and "flag_abs"=1

Member Data Documentation

Property bmtable::arts

Cell of bmart objects.

Definition at line 48 of file bmtable.m.

Property bmtable::blocks

Cell of block objects.

Definition at line 42 of file bmtable.m.

Property bmtable::coldata
protected

Column-wise information.

Definition at line 86 of file bmtable.m.

Property bmtable::colname_type

='dataset'. May be 'dataset' or 'block'

Definition at line 66 of file bmtable.m.

Property bmtable::data_hint

Used to draw the hint spectrum.

Definition at line 69 of file bmtable.m.

Property bmtable::datasets

array of irdata.

datasets are used only if rowname_type is 'dataset'. They are used to get row names (will be dataset.title)

If not used, grid.i_dataset will be irrelevant.

Definition at line 39 of file bmtable.m.

Property bmtable::flag_booted
protected

Definition at line 95 of file bmtable.m.

Property bmtable::flag_data
protected

Definition at line 97 of file bmtable.m.

Property bmtable::flag_reverse
protected

Whether the x-axis is reverse or not.

Definition at line 89 of file bmtable.m.

Property bmtable::flag_train

=0. Whether or not to train the blocks

Definition at line 75 of file bmtable.m.

Property bmtable::grid

2D struct

i_block, i_dataset, i_peakdetector, i_art, i_unit point to elements in respective properties; flag_sig indicated whether to draw significance threshold line; params if passed to get_gradeslegend() and get_grades() (please note: post-training!); peakidxs, peak_y, y are calculated with shake_grid().

Definition at line 31 of file bmtable.m.

Property bmtable::linewidth

=3.5 Width for lineas and markers. Note that this number will be actually multiplied by the global SCALE.

Definition at line 72 of file bmtable.m.

Property bmtable::peakdetectors

Cell of peakdetector objects.

Definition at line 45 of file bmtable.m.

Property bmtable::rowdata
protected

Row-wise information.

Definition at line 83 of file bmtable.m.

Property bmtable::rowname_j

Vector of indexes. As many elements as grid rows. Each element is the index of a grid column.

Definition at line 60 of file bmtable.m.

Property bmtable::rowname_type

='dataset'. May be 'dataset' or 'block'

Definition at line 63 of file bmtable.m.

Property bmtable::sig_j

Vector of indexes. As many elements as grid rows. Each element is the index of a grid column.

Definition at line 54 of file bmtable.m.

Property bmtable::sig_threshold

Significance level. Maybe the granularity of this will change (doubt it).

Definition at line 57 of file bmtable.m.

Property bmtable::units

Cell of bmunit objects.

Definition at line 51 of file bmtable.m.


The documentation for this class was generated from the following file: