From 3e3cff0b7d334d520c5b43413ff1a4f03b76d02f Mon Sep 17 00:00:00 2001 From: jalew188 Date: Wed, 26 Jun 2024 13:02:01 +0200 Subject: [PATCH] FIX alphatims_wrapper docs --- alpharaw/wrappers/alphatims_wrapper.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/alpharaw/wrappers/alphatims_wrapper.py b/alpharaw/wrappers/alphatims_wrapper.py index b001925..c4d00d6 100644 --- a/alpharaw/wrappers/alphatims_wrapper.py +++ b/alpharaw/wrappers/alphatims_wrapper.py @@ -8,7 +8,7 @@ class AlphaTimsReader(MSData_Base): """ - > TimsTOF data are too large, do not use this class + TimsTOF data are too large, do not use this class """ def import_raw(self, burker_d_folder: str): @@ -43,8 +43,16 @@ def import_raw(self, burker_d_folder: str): class AlphaTimsWrapper(TimsTOF): - """Create a AlphaTims object that contains + """Create a AlphaTims object containing all data in-memory (or memory mapping). + + Attribute + --------- + slice_as_dataframe + Attribute from AlphaTims. + If True, AlphaTims slicing returns a pd.DataFrame by default. + If False, AlphaTims slicing provides a np.int64[:] with raw indices. + The value can be modified on-the-fly. """ def __init__(self, msdata: MSData_Base, dda: bool, slice_as_dataframe: bool = True): @@ -62,14 +70,15 @@ def __init__(self, msdata: MSData_Base, dda: bool, slice_as_dataframe: bool = Tr slice_as_dataframe : bool If True, slicing returns a pd.DataFrame by default. If False, slicing provides a np.int64[:] with raw indices. - This value can also be modified after creation. Default is True. """ self._use_calibrated_mz_values_as_default = False self._import_alpharaw_object(msdata, dda) self.thermo_raw_file_name = msdata.raw_file_path self.bruker_d_folder_name = self.thermo_raw_file_name - self.slice_as_dataframe = slice_as_dataframe + self.slice_as_dataframe = ( + slice_as_dataframe # This value can be modified after creation. + ) # Precompile self[0, "raw"]