openpipelines-bio / openpipeline

https://openpipelines.bio
MIT License
25 stars 11 forks source link

full_pipeline - TypeError: boolean value of NA is ambiguous #488

Closed sarahbonnin closed 9 months ago

sarahbonnin commented 10 months ago

Hi,

I get the following error with a test I run using 2 samples (they are from the same experiment, and both h5mu files should be formatted the same way):

Command output:
  2023-07-12 14:07:20,895 INFO     Reading input files combined_rna.calculate_qc_metrics.output.h5mu
  2023-07-12 14:07:21,690 INFO     Merging into single object.

Command error:
  2023-07-12 14:07:20,895 INFO     Reading input files combined_rna.calculate_qc_metrics.output.h5mu
  2023-07-12 14:07:21,690 INFO     Merging into single object.
  Traceback (most recent call last):
    File "/tmp/nxf.ZEYJ5eyiYF/.viash_script.sh", line 78, in <module>
      main()
    File "/tmp/nxf.ZEYJ5eyiYF/.viash_script.sh", line 57, in main
      df = df.replace({pd.NA: np.nan}, inplace=False)
    File "/usr/local/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/pandas/core/frame.py", line 5728, in replace
      return super().replace(
    File "/usr/local/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/pandas/core/generic.py", line 7188, in replace
      return self.replace(
    File "/usr/local/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/pandas/core/frame.py", line 5728, in replace
      return super().replace(
    File "/usr/local/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/pandas/core/generic.py", line 7237, in replace
      new_data = self._mgr.replace_list(
    File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 487, in replace_list
      bm = self.apply(
    File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 352, in apply
      applied = getattr(b, f)(**kwargs)
    File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 737, in replace_list
      result = blk._replace_coerce(
    File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 801, in _replace_coerce
      return self.replace(
    File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 579, in replace
      blk.values._replace(  # type: ignore[union-attr]
    File "/usr/local/lib/python3.10/site-packages/pandas/core/arrays/categorical.py", line 2670, in _replace
      if new_value == replace_value:
    File "pandas/_libs/missing.pyx", line 382, in pandas._libs.missing.NAType.__bool__
  TypeError: boolean value of NA is ambiguous

Work dir:
  /fsx/rnaseq/scopenpipeline/96/fdec0593c3673aa906788a247a7562

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
DriesSchaumont commented 10 months ago

Hi @sarahbonnin, I think this issue was adressed in https://github.com/openpipelines-bio/openpipeline/pull/477 These changes have not been included in the 0.9.0 release. Could you check with the development release (main_build)?

Thanks!

DriesSchaumont commented 9 months ago

Hi @sarahbonnin, I am going to close this issue because it has become stale. Please reopen if you feel that it is necessary.