Skip to content

DIANN pipeline fails in the diann to msstats conversion  #194

Closed

Description

@ypriverol

Description of the bug

/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py:42: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
out_msstats.loc[:,"PeptideSequence"] = out_msstats.apply(lambda x: convert_modification(x["PeptideSequence"], unimod_data), axis=1)
/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py:43: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
out_msstats.loc[:,"FragmentIon"] = 'NA'
/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py:44: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
out_msstats.loc[:,"ProductCharge"] = '0'
/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py:45: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
out_msstats.loc[:,"IsotopeLabelType"] = "L"
/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py:46: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
out_msstats["Reference"] = out_msstats.apply(lambda x: os.path.basename(x['Reference']), axis=1)
Traceback (most recent call last):
File "/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py", line 89, in
cli()
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py", line 48, in convert
out_msstats[["Fraction", "BioReplicate", "Condition"]] = out_msstats.apply(lambda x: query_expdesign_value(x["Reference"], f_table, s_DataFrame),
File "/usr/local/lib/python3.10/site-packages/pandas/core/frame.py", line 8833, in apply
return op.apply().finalize(self, method="apply")
File "/usr/local/lib/python3.10/site-packages/pandas/core/apply.py", line 727, in apply
return self.apply_standard()
File "/usr/local/lib/python3.10/site-packages/pandas/core/apply.py", line 851, in apply_standard
results, res_index = self.apply_series_generator()
File "/usr/local/lib/python3.10/site-packages/pandas/core/apply.py", line 867, in apply_series_generator
results[i] = self.f(v)
File "/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py", line 48, in
out_msstats[["Fraction", "BioReplicate", "Condition"]] = out_msstats.apply(lambda x: query_expdesign_value(x["Reference"], f_table, s_DataFrame),
File "/hps/nobackup/juan/pride/reanalysis/quantms/bin/diann_convert.py", line 67, in query_expdesign_value
Fraction = query_reference["Fraction"].values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

Command used and terminal output

No response

Relevant files

No response

System information

No response

Activity

  1. added
    bug
    on May 25, 2022
  2. linked a pull request that will close this issuequick fix #195on May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions