Describe the bug
Somehow the default values defined for config.QUANT_ID and config.PROTEIN_ID are not set when importing directlfq as module.
The result is a rather confusing pandas error None of [None, None] are in the columns for users.
It can be mitigated by calling lfqconfig.set_global_protein_and_ion_id(protein_id = 'protein', quant_id = 'ion') before.
To Reproduce
Steps to reproduce the behavior:
import direct LFQ
call directLFQ on a dataframe with default columns protein and ion.
Logs
Traceback (most recent call last):
File "d:\alphadia\alphadia\planning.py", line 274, in run
output.build(workflow_folder_list, base_spec_lib)
File "d:\alphadia\alphadia\outputtransform.py", line 365, in build
_ = self.build_protein_table(folder_list, psm_df=psm_df, save=True)
File "d:\alphadia\alphadia\outputtransform.py", line 571, in build_protein_table
protein_df = qb.lfq(
File "d:\alphadia\alphadia\outputtransform.py", line 269, in lfq
lfq_df = lfqutils.index_and_log_transform_input_df(intensity_df)
File "D:\Maria\anaconda\envs\alpha\lib\site-packages\directlfq\utils.py", line 323, in index_and_log_transform_input_df
data_df = data_df.set_index([config.PROTEIN_ID, config.QUANT_ID])
File "D:\Maria\anaconda\envs\alpha\lib\site-packages\pandas\core\frame.py", line 5859, in set_index
raise KeyError(f"None of {missing} are in the columns")
KeyError: 'None of [None, None] are in the columns'
0:00:57.756267 ERROR: Output failed with error 'None of [None, None] are in the columns'
'None of [None, None] are in the columns'
Version (please complete the following information):
Describe the bug Somehow the default values defined for
config.QUANT_ID
andconfig.PROTEIN_ID
are not set when importing directlfq as module.The result is a rather confusing pandas error
None of [None, None] are in the columns
for users. It can be mitigated by callinglfqconfig.set_global_protein_and_ion_id(protein_id = 'protein', quant_id = 'ion')
before.To Reproduce Steps to reproduce the behavior:
protein
andion
.Logs
Version (please complete the following information):