Skip to content

time_diff #5

Description

@sizhenran

Hi Developer,

Thank you for creating this excellent software!

I downloaded it according to the tutorial masscube and prepared the data format, I have two batches that need to be normalized, but I encountered some problems, I tried to add batch in sample_table, but the same error will still appear. The display time is not automatically recognized. How should I solve it?

Welcome to the untargeted metabolomics workflow.

Step 1: Preparing the workflow...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "F:\software\Scripts\untargeted-metabolomics.exe\__main__.py", line 6, in <module>
    sys.exit(untargeted_metabolomics_workflow())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "F:\software\Lib\site-packages\masscube\workflows.py", line 175, in untargeted_metabolomics_workflow
    params._untargeted_metabolomics_workflow_preparation()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "F:\software\Lib\site-packages\masscube\params.py", line 256, in _untargeted_metabolomics_workflow_preparation
    self.sample_metadata = label_batch_id(self.sample_metadata)
                           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "F:\software\Lib\site-packages\masscube\utils_functions.py", line 156, in label_batch_id
    t0 = ratio_threshold * np.min(time_diff)
                           ~~~~~~^^^^^^^^^^^
  File "F:\software\Lib\site-packages\numpy\_core\fromnumeric.py", line 3302, in min
    return _wrapreduction(a, np.minimum, 'min', axis, None, out,
                          keepdims=keepdims, initial=initial, where=where)
  File "F:\software\Lib\site-packages\numpy\_core\fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity

<img width="357" height="113" alt="Image" src="https://github.com/user-attachments/assets/36c4029b-8be5-4018-b90e-419dab3dcef5" />

Thanks,



zhenran si

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions