Changelog
Changes in v2.3.0
All functions, classes and methods now have PEP 484 type hints. Contributed by Chris Davis-Foster in #4
All modules now implement
__all__to limit the objects imported when using*imports.Removed the following deprecated functions:
Removed object
Suggested replacement
pyms.Experiment.Experiment.get_expr_code()pyms.Experiment.Experiment.get_peak_list()pyms.Experiment.Experiment.store()pyms.Experiment.store_expr()pyms.GCMS.Class.GCMS_data.get_scan_list()pyms.GCMS.Class.GCMS_data.get_tic()pyms.Gapfill.Class.MissingPeak.get_common_ion()pyms.Gapfill.Class.MissingPeak.get_common_ion_area()pyms.Gapfill.Class.MissingPeak.get_exact_rt()pyms.Gapfill.Class.MissingPeak.get_qual_ion1()pyms.Gapfill.Class.MissingPeak.get_qual_ion2()pyms.Gapfill.Class.MissingPeak.get_rt()pyms.Gapfill.Class.MissingPeak.set_common_ion_area()pyms.Gapfill.Class.MissingPeak.set_exact_rt()pyms.Gapfill.Class.Sample.get_missing_peaks()pyms.Gapfill.Class.Sample.get_mp_rt_area_dict()pyms.Gapfill.Class.Sample.get_name()pyms.Gapfill.Function.transposed()pyms.IonChromatogram.IonChromatogram.get_mass()pyms.IonChromatogram.IonChromatogram.get_time_step()pyms.IonChromatogram.IonChromatogram.set_intensity_array()pyms.Mixins.MaxMinMassMixin.get_max_mass()pyms.Mixins.MaxMinMassMixin.get_min_mass()pyms.Mixins.MassListMixin.get_mass_list()pyms.Mixins.TimeListMixin.get_time_list()pyms.Mixins.IntensityArrayMixin.get_intensity_array()pyms.Mixins.IntensityArrayMixin.get_matrix_list()pyms.Peak.Class.Peak.get_area()pyms.Peak.Class.Peak.get_ic_mass()pyms.Peak.Class.Peak.get_ion_areas()pyms.Peak.Class.Peak.get_mass_spectrum()pyms.Peak.Class.Peak.get_pt_bounds()pyms.Peak.Class.Peak.get_rt()pyms.Peak.Class.Peak.get_UID()pyms.Peak.Class.Peak.set_area()pyms.Peak.Class.Peak.set_ic_mass()pyms.Peak.Class.Peak.set_ion_areas()pyms.Peak.Class.Peak.set_mass_spectrum()pyms.Peak.Class.Peak.set_pt_bounds()pyms.Peak.Class.Peak.pt_boundspyms.Utils.Utils.is_positive_int()pyms.Utils.Utils.is_list_of_dec_nums()Renamed
pyms.Gapfill.Function.file2matrix()topyms.Gapfill.Function.file2dataframe(). The function now returns a Pandas DataFrame.Split
pyms.IntensityMatrix.IntensityMatrixinto two classes:pyms.IntensityMatrix.BaseIntensityMatrixandpyms.IntensityMatrix.IntensityMatrix. This makes subclassing easier.Split
pyms.Peak.Class.Peakinto three classes:pyms.Peak.Class.AbstractPeak,pyms.Peak.Class.Peak,pyms.Peak.Class.ICPeak.ICPeakis returned when a mass is passed to thePeakconstructor instead of a mass spectrum.Added the following functions and classes:
Flag to indicate the filetype for
pyms.Gapfill.Function.missing_peak_finder().Enumeration of supported ASCII filetypes for
export_ascii().Constructs a Base Peak Chromatogram from the data.
Returns whether the ion chromatogram is an extracted ion chromatogram (EIC).
Returns whether the ion chromatogram is a base peak chromatogram (BPC).
Models an extracted ion chromatogram (EIC).
Models a base peak chromatogram (BPC).
Convert the given numpy array to a numeric data type.
Returns whether the object represents a filesystem path.
Returns whether the object is a
Sequence, and not a string.pyms.Utils.Utils.is_sequence_of(obj, of)Returns whether the object is a
Sequence, and not a string, of the given type.Returns whether
objis a numerical value (int, :class`float` etc).Class to model a subset of data from an Intensity Matrix.
The
iaparameter ofpyms.IonChromatogram.IonChromatogram`was renamed tointensity_list.
Changes in v2.2.22-beta2
pyms.Spectrum.Scanandpyms.Spectrum.MassSpectrumcan now accept any values formassandintensitythat that can be converted to afloatorint. This includes strings representing numbers. Previously onlyintandfloatvalues were permitted.If the mass and intensity values supplied to a
pyms.Spectrum.Scanor apyms.Spectrum.MassSpectrumarefloat,int, or a data type derived fromnumpy.number, the data is stored in that type. For other data types, such as strings,decimal.Decimaletc., the data is stored asfloat.If the data contains values in mixed types then, in most cases, all values will be converted to
float. If you wish to control this behaviour you should construct anumpy.ndarraywith the desired type. See https://numpy.org/devdocs/user/basics.types.html for a list of types.A
TypeErroris no longer raised when creating apyms.Spectrum.Scanor apyms.Spectrum.MassSpectrumwith afloat,intetc. rather than a sequence. Instead, value is treated as being the sole element in a list.Passing a non-numeric string or a list of non-numeric strings to
pyms.Spectrum.Scanorpyms.Spectrum.MassSpectrumnow raises aValueErrorand not aTypeErroras in previous versions.pyms.Peak.Class.Peak.ion_areas()now accepts dictionary keys asfloatas well asint.
Changes in v2.2.22-beta1
ANDI_reader()andpyms.Spectrum.Scanwere modified to allow ANDI-MS files to be read if the data either:had the m/z data stored from highest m/z to lowest; or
contained 0-length scans.