- All functions, classes and methods now have
484
type hints. Contributed by Chris Davis-Foster in4
- 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.expr_code
pyms.Experiment.Experiment.get_peak_list
pyms.Experiment.Experiment.peak_list
pyms.Experiment.Experiment.store
pyms.Experiment.Experiment.dump
pyms.Experiment.store_expr
pyms.Experiment.Experiment.dump
pyms.GCMS.Class.GCMS_data.get_scan_list
pyms.GCMS.Class.GCMS_data.scan_list
pyms.GCMS.Class.GCMS_data.get_tic
pyms.GCMS.Class.GCMS_data.tic
pyms.Gapfill.Class.MissingPeak.get_common_ion
pyms.Gapfill.Class.MissingPeak.common_ion
pyms.Gapfill.Class.MissingPeak.get_common_ion_area
pyms.Gapfill.Class.MissingPeak.common_ion_area
pyms.Gapfill.Class.MissingPeak.get_exact_rt
pyms.Gapfill.Class.MissingPeak.exact_rt
pyms.Gapfill.Class.MissingPeak.get_qual_ion1
pyms.Gapfill.Class.MissingPeak.qual_ion1
pyms.Gapfill.Class.MissingPeak.get_qual_ion2
pyms.Gapfill.Class.MissingPeak.qual_ion2
pyms.Gapfill.Class.MissingPeak.get_rt
pyms.Gapfill.Class.MissingPeak.rt
pyms.Gapfill.Class.MissingPeak.set_common_ion_area
pyms.Gapfill.Class.MissingPeak.common_ion_area
pyms.Gapfill.Class.MissingPeak.set_exact_rt
pyms.Gapfill.Class.MissingPeak.exact_rt
pyms.Gapfill.Class.Sample.get_missing_peaks
pyms.Gapfill.Class.Sample.missing_peaks
pyms.Gapfill.Class.Sample.get_mp_rt_area_dict
pyms.Gapfill.Class.Sample.rt_areas
pyms.Gapfill.Class.Sample.get_name
pyms.Gapfill.Class.Sample.name
pyms.Gapfill.Function.transposed
pyms.IonChromatogram.IonChromatogram.get_mass
pyms.IonChromatogram.IonChromatogram.mass
pyms.IonChromatogram.IonChromatogram.get_time_step
pyms.IonChromatogram.IonChromatogram.time_step
pyms.IonChromatogram.IonChromatogram.set_intensity_array
pyms.IonChromatogram.IonChromatogram.intensity_array
pyms.Mixins.MaxMinMassMixin.get_max_mass
pyms.Mixins.MaxMinMassMixin.max_mass
pyms.Mixins.MaxMinMassMixin.get_min_mass
pyms.Mixins.MaxMinMassMixin.min_mass
pyms.Mixins.MassListMixin.get_mass_list
pyms.Mixins.MassListMixin.mass_list
pyms.Mixins.TimeListMixin.get_time_list
pyms.Mixins.TimeListMixin.time_list
pyms.Mixins.IntensityArrayMixin.get_intensity_array
pyms.Mixins.IntensityArrayMixin.intensity_array
pyms.Mixins.IntensityArrayMixin.get_matrix_list
pyms.Mixins.IntensityArrayMixin.intensity_array_list
pyms.Peak.Class.Peak.get_area
pyms.Peak.Class.Peak.area
pyms.Peak.Class.Peak.get_ic_mass
pyms.Peak.Class.ICPeak.ic_mass
pyms.Peak.Class.Peak.get_ion_areas
pyms.Peak.Class.Peak.ion_areas
pyms.Peak.Class.Peak.get_mass_spectrum
pyms.Peak.Class.Peak.mass_spectrum
pyms.Peak.Class.Peak.get_pt_bounds
pyms.Peak.Class.Peak.bounds
pyms.Peak.Class.Peak.get_rt
pyms.Peak.Class.Peak.rt
pyms.Peak.Class.Peak.get_UID
pyms.Peak.Class.Peak.UID
pyms.Peak.Class.Peak.set_area
pyms.Peak.Class.Peak.area
pyms.Peak.Class.Peak.set_ic_mass
pyms.Peak.Class.ICPeak.ic_mass
pyms.Peak.Class.Peak.set_ion_areas
pyms.Peak.Class.Peak.ion_areas
pyms.Peak.Class.Peak.set_mass_spectrum
pyms.Peak.Class.Peak.mass_spectrum
pyms.Peak.Class.Peak.set_pt_bounds
pyms.Peak.Class.Peak.pt_bounds
pyms.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.IntensityMatrix
into two classes:pyms.IntensityMatrix.BaseIntensityMatrix
andpyms.IntensityMatrix.IntensityMatrix
. This makes subclassing easier. - Split
pyms.Peak.Class.Peak
into three classes:pyms.Peak.Class.AbstractPeak
,pyms.Peak.Class.Peak
,pyms.Peak.Class.ICPeak
.~pyms.Peak.Class.ICPeak
is returned when a mass is passed to the~pyms.Peak.Class.Peak
constructor instead of a mass spectrum. Added the following functions and classes:
pyms.Gapfill.Function.MissingPeakFiletype pyms.IntensityMatrix.AsciiFiletypes pyms.IntensityMatrix.IntensityMatrix.bpc pyms.IonChromatogram.IonChromatogram.is_eic pyms.IonChromatogram.IonChromatogram.is_bpc pyms.IonChromatogram.ExtractedIonChromatogram pyms.IonChromatogram.BasePeakChromatogram pyms.Spectrum.array_as_numeric pyms.Utils.Utils.is_path pyms.Utils.Utils.is_sequence pyms.Utils.Utils.is_sequence_of pyms.Utils.Utils.is_number pyms.eic
- The
ia
parameter ofpyms.IonChromatogram.IonChromatogram
was renamed to intensity_list`.
pyms.Spectrum.Scan
andpyms.Spectrum.MassSpectrum
can now accept any values formass
andintensity
that that can be converted to afloat
orint
. This includes strings representing numbers. Previously onlyint
andfloat
values were permitted.If the mass and intensity values supplied to a
pyms.Spectrum.Scan
or apyms.Spectrum.MassSpectrum
arefloat
,int
, or a data type derived fromnumpy.number
, the data is stored in that type. For other data types, such as strings,decimal.Decimal
etc., 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.ndarray
with the desired type. See https://numpy.org/devdocs/user/basics.types.html for a list of types.- A
TypeError
is no longer raised when creating apyms.Spectrum.Scan
or apyms.Spectrum.MassSpectrum
with afloat
,int
etc. 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.Scan
orpyms.Spectrum.MassSpectrum
now raises aValueError
and not aTypeError
as in previous versions. pyms.Peak.Class.Peak.ion_areas
now accepts dictionary keys asfloat
as well asint
.
~pyms.GCMS.IO.ANDI.ANDI_reader
andpyms.Spectrum.Scan
were 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.