MannLabs / directlfq

Fast and accurate label-free quantification for small and very large numbers of proteomes
https://doi.org/10.1101/2023.02.17.528962
Apache License 2.0
37 stars 4 forks source link

Maxquant_evidence Config TypeError #3

Closed JuliaS92 closed 5 months ago

JuliaS92 commented 1 year ago

Describe the bug Running on MQ evidence file from the CLI raises TypeError: format not specified in intable_config.yaml

To Reproduce Steps to reproduce the behavior:

directlfq lfq -i "yaddayadda\txt\evidence.txt" -it maxquant_evidence

Direct lfq Console

Starting directLFQ analysis
You provided a MaxQuant peptide or evidence file as input. To have the identical ProteinGroups as in the MaxQuant analysis, please provide the ProteinGroups.txt file as well.
Traceback (most recent call last):
  File "D:\pipenvs\directlfq\Scripts\directlfq-script.py", line 33, in <module>
    sys.exit(load_entry_point('directlfq==0.2.3', 'console_scripts', 'directlfq')())
  File "d:\pipenvs\directlfq\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "d:\pipenvs\directlfq\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "d:\pipenvs\directlfq\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\pipenvs\directlfq\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\pipenvs\directlfq\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "d:\pipenvs\directlfq\lib\site-packages\directlfq\cli.py", line 202, in run_directlfq
    directlfq.lfq_manager.run_lfq(**kwargs)
  File "d:\pipenvs\directlfq\lib\site-packages\directlfq\lfq_manager.py", line 36, in run_lfq
    input_df = lfqutils.import_data(input_file=input_file, input_type_to_use=input_type_to_use)
  File "d:\pipenvs\directlfq\lib\site-packages\directlfq\utils.py", line 783, in import_data
    file_to_read = reformat_and_save_input_file(input_file=input_file, input_type_to_use=input_type_to_use)
  File "d:\pipenvs\directlfq\lib\site-packages\directlfq\utils.py", line 792, in reformat_and_save_input_file
    input_type, config_dict_for_type, sep = get_input_type_and_config_dict(input_file, input_type_to_use)
  File "d:\pipenvs\directlfq\lib\site-packages\directlfq\utils.py", line 856, in get_input_type_and_config_dict
    raise TypeError("format not specified in intable_config.yaml!")
TypeError: format not specified in intable_config.yaml!

Version (please complete the following information):

Additional context I already checked on github and in my local clone: maxquant_evidence is in the yaml file. I tied this both on DDA and DIA output and both raise the same error. Using the gui from the same environment starts fine, but autodetects the input as maxquant_evidence_leading_razor_protein.

ammarcsj commented 1 year ago

Hi Julia, thanks a lot for the info! Does is run through if you leave out the 'maxquant evidence' specifier?

JuliaS92 commented 1 year ago

Yes, then it runs smoothly and defaults to maxquant_evidence_leading_razor_protein as input type.

ammarcsj commented 1 year ago

Thanks for the feedback. The issue is that the maxquant_evidence specification assumes that you have also provided a proteinGroups.txt mapping. Ideally the user provides also the proteinGroups.txt file, it is needed in order to have the protein group mapping exactly as MaxQuant has it. If this is not provided, it will use the 'leading razor protein' column for mapping. I should change the namings to make this more clear.