4.11. Samples

class asari.samples.SimpleSample(registry={}, experiment=None, database_mode='ondisk', mode='pos', is_reference=False)[source]

Lightweight class of an experimental sample to facilitate workflow. The primary use of this class is managing data stroage and retreival at sample level.

Depending on database_mode, sample list_mass_tracks are stored in memory, or on disk, or in MongoDB. Function to get mass tracks from a mzML file is in workflow.process_project and batch_EIC_from_samples_. Peaks and empCpds are determined in constructors.CompositeMap.

get_masstracks_and_anchors()[source]

Retrieve list_mass_tracks for this sample if not alrady in memory.

Return type:

A list of all mass tracks in this sample.

Note

Mass tracks are the bulk of data per sample, stored dependent on database_mode. list_mass_tracks is accessed twice in this version of asari: 1) RT calibration and building composite map 2) extraction of peak areas for features

get_rt_calibration_records()[source]

Returns a dictionary of sample_id, name, rt_landmarks (list of apex scan numbers for the peaks used in RT calibration), reverse_rt_cal_dict (key=reference scan number, value=sample specific scan number).

push_to_db(cursor)[source]

Placeholder.

Parameters:

instance (cursor - database cursor) – cursor to interact with database

retrieve_from_db(cursor)[source]

Placeholder.

Parameters:

instance (cursor - database cursor) – cursor to interact with database