Skip to content

dataframe error in quantmsioc convert-ibaq #97

@enryH

Description

@enryH

I try to follow the instruction on ibaqpy, see here
and I managed to use quantmsioc convert-feature, but then I run into an issue for quantmsioc convert-ibaq

>>> quantmsioc convert-ibaq \
--feature_file results/quantmsio/feature-00e1d8d0-aecf-421c-bd54-c661c70f415d.feature.parquet \
--sdrf_file hdp_unibio_sdrf.txt \
--output_folder results/ibaq

Determination of memory status is not supported on this 
 platform, measuring for memoryleaks will never fail
Traceback (most recent call last):
  File "/Users/heweb/miniforge3/envs/ibaqpy/bin/quantmsioc", line 8, in <module>
    sys.exit(quantms_io_main())
             ^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/quantmsio/quantmsioc.py", line 79, in quantms_io_main
    cli()
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/quantmsio/commands/ibaq_command.py", line 52, in convert_ibaq_file
    write_ibaq_feature(sdrf_file, feature_file, output_path)
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/quantmsio/operate/tools.py", line 332, in write_ibaq_feature
    for feature in genereate_ibaq_feature(sdrf_path, parquet_path):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/quantmsio/operate/tools.py", line 293, in genereate_ibaq_feature
    experiment_type = sdrf.get_experiment_type_from_sdrf()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/heweb/miniforge3/envs/ibaqpy/lib/python3.12/site-packages/pandas/core/generic.py", line 6299, in __getattr__
    return object.__getattribute__(self, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DataFrame' object has no attribute 'get_experiment_type_from_sdrf'

I find the function, but the object registration does seem to be missing.
https://github.com/bigbio/quantms.io/blob/4aa9351edc81b1551e0ff6d594a66be69b40aeb8/quantmsio/core/sdrf.py#L267

If I manage to fix that, I will create an PR...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions