Skip to content

Remove unnecessary set_index to fix stat module for function-taxonomy analysis - #50

Open
reid-wagner wants to merge 1 commit into
galaxyproteomics:masterfrom
reid-wagner:fix_ft_stat
Open

reid-wagner wants to merge 1 commit into
galaxyproteomics:masterfrom
reid-wagner:fix_ft_stat

Conversation

@reid-wagner

Copy link
Copy Markdown
Contributor

Removes unncessary set_index call. The 'id' column does not exist for function-taxonomy analysis (mode='ft') input, from the filter or expand modules, causing the error below. Comments state this was included for testing, and removing it does not affect output results.

Also, make a small correction to comments.

  File "/usr/local/lib/python3.14/site-packages/metaquantome/modules/stat.py", line 53, in stat
    df_tmp = test_norm_intensity(df, tmp_samp_grps, paired, parametric)
  File "/usr/local/lib/python3.14/site-packages/metaquantome/modules/stat.py", line 123, in test_norm_intensity
    df_means.set_index('id', drop=False, inplace=True)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/pandas/core/frame.py", line 6977, in set_index
    raise KeyError(f"None of {missing} are in the columns")
KeyError: "None of ['id'] are in the columns"

@reid-wagner
reid-wagner requested a review from subinamehta July 9, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant