bigbio / sdrf-pipelines

A repository to convert SDRF proteomics files into pipelines config files
Apache License 2.0
16 stars 21 forks source link

Check to see if key is present *and* values are set #144

Closed lazear closed 1 year ago

lazear commented 1 year ago

Fix various index out of range failures

Traceback (most recent call last):
  File "/opt/homebrew/bin/parse_sdrf", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/sdrf_pipelines/parse_sdrf.py", line 226, in main
    cli()
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/sdrf_pipelines/parse_sdrf.py", line 101, in maxquant_from_sdrf
    Maxquant().maxquant_convert(
  File "/opt/homebrew/lib/python3.10/site-packages/sdrf_pipelines/maxquant/maxquant.py", line 1429, in maxquant_convert
    first = list(tparam.values())[0]
IndexError: list index out of range
github-actions[bot] commented 1 year ago

Python linting (black) is failing

To keep the code consistent with lots of contributors, we run automated code consistency checks. To fix this CI test, please run:

lazear commented 1 year ago

Sorry, it looks like I added an extra colon on most of the lines... I did the editing on the web interface 🫢

Maybe revert or just add another commit to fix it?

ypriverol commented 1 year ago

Fixed in my PR.