Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peakfilter issue #5

Open
rromoli opened this issue Feb 8, 2021 · 1 comment
Open

peakfilter issue #5

rromoli opened this issue Feb 8, 2021 · 1 comment
Assignees

Comments

@rromoli
Copy link

rromoli commented Feb 8, 2021

Hi, this is the first time I use LipidFinder. I read the guide and following the steps you suggested. Running peakfilter I get this error:

$ python3 ~/.local/bin/run_peakfilter.py -i ~/Data/2021/lipidi/out_lipid_xcms_pos.csv -o results -p ~/Data/2021/lipidi/lipid.json
Traceback (most recent call last):##########------------| 66.7% Completed
File "/home/cism/.local/bin/run_peakfilter.py", line 10, in <module> sys.exit(main())

File "/home/cism/.local/lib/python3.7/site-packages/LipidFinder/run_peakfilter.py", line 51, in main
    PeakFilter.peak_filter(data, parameters, dst, args.verbose)
File "/home/cism/.local/lib/python3.7/site-packages/LipidFinder/PeakFilter/__init__.py", line 212, in peak_filter
  BroadContaminant.process_all_features(data, parameters)
File "/home/cism/.local/lib/python3.7/site-packages/LipidFinder/PeakFilter/BroadContaminant.py", line 52, in process_all_features
  __process_feature__, rtArray=rtArray, parameters=parameters)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 894, in apply
  result = self._python_apply_general(f, self._selected_obj)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 928, in _python_apply_general
  keys, values, mutated = self.grouper.apply(f, data, self.axis)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/groupby/ops.py", line 238, in apply
  res = f(group)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 878, in f
  return func(g, *args, **kwargs)
File "/home/cism/.local/lib/python3.7/site-packages/LipidFinder/PeakFilter/BroadContaminant.py", line 78, in __process_feature__
  parameters=parameters)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 7765, in apply
  return op.get_result()
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 185, in get_result
  return self.apply_standard()
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 276, in apply_standard
  results, res_index = self.apply_series_generator()
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 290, in apply_series_generator
  results[i] = self.f(v)
File "/home/cism/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 110, in f
  return func(x, *args, **kwds)
File "/home/cism/.local/lib/python3.7/site-packages/LipidFinder/PeakFilter/BroadContaminant.py", line 94, in __process_sample_mean__
  nonZeroIndex = intensities.to_numpy().nonzero()[0]
AttributeError: 'numpy.ndarray' object has no attribute 'to_numpy'`

While I have a good knowledge of R language, I am a newbie in Python so I'm not able to solve the issue I get running the code. Can you help me to fix it?

@JAlvarezJarreta
Copy link
Collaborator

JAlvarezJarreta commented Feb 13, 2021

Hello @rromoli, we have recently discovered some bugs regarding BroadContaminant that have been addressed (and involved the lines your error is reporting) and will be included in the release binary 2.0.2 that is now available. Please, give it a try and don't hesitate to reach back if the issue perseveres.

@JAlvarezJarreta JAlvarezJarreta self-assigned this Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants