Skip to content

Commit

Permalink
#53 update more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jalew188 committed Jun 14, 2024
1 parent 46f48d0 commit a54c139
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion alpharaw/ms_data_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,39 @@ def reset_spec_idxes(self):
self.spectrum_df.reset_index(drop=True, inplace=True)
self.spectrum_df["spec_idx"] = self.spectrum_df.index.values

def _import(self, _path):
def _import(self, _path: str) -> dict:
"""
_summary_
Parameters
----------
_path : str
_description_
Returns
-------
dict
Example:
```
spec_dict = {
"_peak_indices": _peak_indices,
"peak_mz": np.concatenate(mz_values).copy(),
"peak_intensity": np.concatenate(intensity_values).copy(),
"rt": np.array(rt_values).copy(),
"precursor_mz": np.array(precursor_mz_values).copy(),
"precursor_charge": np.array(precursor_charges, dtype=np.int8).copy(),
"isolation_lower_mz": np.array(isolation_mz_lowers).copy(),
"isolation_upper_mz": np.array(isolation_mz_uppers).copy(),
"ms_level": np.array(ms_order_list, dtype=np.int8).copy(),
"nce": np.array(ce_list, dtype=np.float32).copy(),
}
```
Raises
------
NotImplementedError
Sub-class of `MSData_Base` must implement this method.
"""
raise NotImplementedError(f"{self.__class__} must implement `_import()`")

def _set_dataframes(self, raw_data: dict):
Expand Down

0 comments on commit a54c139

Please sign in to comment.