4.6. Dashboard
Functions for subcommand viz
- asari.dashboard.cmapplot_mass_tracks(cmap, rt_list, color, track_id_number)[source]
return a hv plot of mass track, by track_id_number
- Parameters:
cmap –
- CMAP as from ext_Experiment {
‘_number_of_samples_’: self.CMAP._number_of_samples_, ‘rt_length’: self.CMAP.rt_length, ‘dict_scan_rtime’: self.CMAP.dict_scan_rtime, ‘list_mass_tracks’: self.CMAP.composite_mass_tracks, ‘MassGrid’: dict(self.CMAP.MassGrid),
}
rt_list – list of retention time
color – color for scatter
track_id_number – index for a mass track in cmap[‘list_mass_tracks’]
- Return type:
A holoviz plot object.
- asari.dashboard.convert_dict_html(d, title='')[source]
Convert a peak dictionary into readable HTML. May need to improve error handling since KeyError is potential problem. Returns HTML as a string.
- asari.dashboard.convert_dict_markdown(d, title='')[source]
Convert a peak dictionary into Markdown string.
- asari.dashboard.find_a_good_peak(peakDict)[source]
To find a good example feature/peak, which can be used as the feature on landing page.
- asari.dashboard.find_track_by_mz(cmap, rt_list, mz)[source]
return track_id_number by cloesest m/z.
- asari.dashboard.get_summary_panel(project_desc, peakDict, epdDict, Ftable, cmap)[source]
Get a summary panel, returns a panel.Column of multiple tabs for summary metrics.
- asari.dashboard.plot_xic(xics, mz_dict, track_id)[source]
Generates scatter plot for a mass track as dataframe. Test function.
- asari.dashboard.prepare_rt_alignment(cmap)[source]
this method prepares necessary dataframe for retention time alignment.
- Parameters:
cmap (dict) – pickle information read include all we need for retention time alignment
- Returns:
pandas dataframe ready for holoview drawing
- Return type:
dataframe
- asari.dashboard.read_project(datadir, load_sample_limit=20)[source]
Get all project data.
- Returns:
project_desc – dict of project meta data
cmap – composite map, [‘_number_of_samples_’, ‘rt_length’, ‘dict_scan_rtime’, ‘list_mass_tracks’, ‘MassGrid’]
epd – dict of empirical compounds
Ftable – pandas dataframe of feature table. Truncated if samples more than load_sample_limit.