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

DIANN pipeline fails in the diann to msstats conversion #194

Closed
ypriverol opened this issue May 25, 2022 · 0 comments · Fixed by #195
Closed

DIANN pipeline fails in the diann to msstats conversion #194

ypriverol opened this issue May 25, 2022 · 0 comments · Fixed by #195
Assignees
Labels
bug Something isn't working

Comments

@ypriverol
Copy link
Member

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

@ypriverol ypriverol added the bug Something isn't working label May 25, 2022
@daichengxin daichengxin linked a pull request May 25, 2022 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants