compound_stats Package¶
compound_stats
Package¶
Package containing shared third-party code modules included here to reduce the need for external dependencies when only small parts of external code are used.
omsi_score_midas
Module¶
MIDAS spectrum analysis
-
class
omsi.analysis.compound_stats.omsi_score_midas.
omsi_score_midas
(name_key='undefined')¶ Bases:
omsi.analysis.base.analysis_base
Class for executing midas on an MSI or local peak finding dataset.
Initialize the basic data members
-
execute_analysis
(spectrum_indexes=None, compound_list=None)¶ Execute the local peak finder for the given msidata.
Parameters: - spectrum_indexes – List with a list of integer indicies of the subset of sepctra that should be processed by this MPI task. If spectrum_indexes is set, then the given subblock will be processed in SERIAL instead of processing self[‘fpl_data’] in PARALLEL (if available). This parameter is strictly optional and intended for internal use only to facilitate the efficient parallel implementation.
- compound_list – List of the compounds from the database file. This parameter is used to avoid having to read the compound database on every compute task that calls this function when running in parallel. This parameter is strictly optional and intended for internal use only to facilitate the efficient parallel implementation.
Returns: A tuple with an array of hit_tables with the scores for each pixel and a 2D array of pixel indices describing for each spectrum the (x,y) pixel location in the image. The hit_table is an array of (#spectra x #compounds). The hit_table is a structured numpy array with the following columns:
- ‘score’, float, MIDAS score of row
- ‘id’, str, database ID e.g. ‘MetaCyC_7884’
- ‘name’, str, database name, e.g. ‘glycine’
- ‘mass’, float, mass in Da of IDed compound
- ‘n_peaks’, int, number of peaks in data
- ‘n_match’, int, number of peaks in data matched
-
omsi_score_pactolus
Module¶
MIDAS spectrum analysis
-
class
omsi.analysis.compound_stats.omsi_score_pactolus.
omsi_score_pactolus
(name_key='undefined')¶ Bases:
omsi.analysis.base.analysis_base
Class for executing Pactolus on a local peak finding dataset.
Initialize the basic data members
-
execute_analysis
(spectrum_indexes=None, file_lookup_table=None)¶ Execute the local peak finder for the given msidata.
Parameters: - spectrum_indexes – List with a list of integer indicies of the subset of sepctra that should be processed by this MPI task. If spectrum_indexes is set, then the given subblock will be processed in SERIAL instead of processing self[‘fpl_data’] in PARALLEL (if available). This parameter is strictly optional and intended for internal use only to facilitate the efficient parallel implementation.
- file_lookup_table – The Pactolus lookup table with the list of tree files and their mass.
Returns: A series of numpy arrays with the score data for each pixel and a 2D array of pixel indices describing for each spectrum the (x,y) pixel location in the image.
- [‘pixel_index’, ‘score’, ‘id’, ‘name’, ‘mass’, ‘n_peaks’, ‘n_match’]
- ‘pixel_index’ , int, 2D array of pixel indices describing for each spectrum the (x,y) pixel location in the imag
- ‘score’, float, MIDAS score of row
- ‘id’, str, database ID e.g. ‘MetaCyC_7884’
- ‘name’, str, database name, e.g. ‘glycine’
- ‘mass’, float, mass in Da of IDed compound
- ‘n_peaks’, int, number of peaks in data
- ‘n_match’, int, number of peaks in data matched
-