Skip to content

Enhance analyzer with canonical columns and version bump#19

Merged
byemaxx merged 7 commits into
mainfrom
dev
Jul 11, 2026
Merged

Enhance analyzer with canonical columns and version bump#19
byemaxx merged 7 commits into
mainfrom
dev

Conversation

@byemaxx

@byemaxx byemaxx commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This pull request updates MetaX to version 2.4.4 and focuses on improving background task cancellation handling, standardizing DIA-NN sample column naming, and enhancing metadata loading robustness. It also adds and updates tests to ensure these behaviors. Below are the most important changes:

Background task cancellation improvements:

  • Introduced the FunctionExecutor.is_cancelled_result class method to reliably detect cancellation markers, and updated GUI code to use this method for better background task cancellation handling (metax/gui/metax_gui/generic_thread.py, metax/gui/main_gui.py, tests/test_function_executor.py). [1] [2] [3]

DIA-NN sample column naming standardization:

  • Standardized the output sample columns from DIA-NN to use the Intensity_ prefix, updated related helper functions, and adjusted all downstream code and documentation to reflect this naming convention (metax/peptide_annotator/peptide_table_prepare.py, Docs/MetaX_Cookbook.md, tests/test_peptide_table_prepare.py, tests/test_unit_specific_gui_settings_dialog.py). [1] [2] [3] [4] [5] [6] [7]

Metadata loading robustness:

  • Improved handling of ambiguous or malformed metadata tables by detecting and properly handling exported index columns and conflicting Sample columns, with new error messages and logic to ensure sample names are correctly identified (metax/taxafunc_analyzer/analyzer.py, tests/test_analyzer.py). [1] [2]

Documentation and versioning:

  • Updated the changelog and version number to 2.4.4 to document these fixes and improvements (Docs/ChangeLog.md, metax/utils/version.py). [1] [2]

@byemaxx

byemaxx commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b63053343

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread metax/taxafunc_analyzer/analyzer.py Outdated
# A pandas/Excel export can leave its row index in an
# unnamed first column. In that unambiguous case, use the
# explicitly named Sample column instead.
meta = meta.drop(columns=first_col)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-check Sample ambiguity after dropping an exported index

When a meta table has an exported unnamed index plus a first sample-name column with a non-Sample header and a later metadata column named Sample (for example \tSubject\tSample\tGroup), this branch drops the index and then skips the ambiguity check that would have rejected Subject\tSample\tGroup. The subsequent unconditional rename creates duplicate Sample columns, which can corrupt meta_df or make later meta['Sample'] operations fail, so the ambiguity check needs to be applied again after removing the index column.

Useful? React with 👍 / 👎.

@byemaxx

byemaxx commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

@codex check the comment and review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd576947ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread metax/taxafunc_analyzer/analyzer.py Outdated
# A pandas/Excel export can leave its row index in an
# unnamed first column. Remove it, then re-check whether
# the explicitly named Sample column is now first.
meta = meta.drop(columns=first_col)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain possible sample IDs in unnamed first column

When a metadata file is saved with sample IDs as the DataFrame index and also has another column named Sample (for example an alias/display-name column), pandas writes those real IDs under an unnamed first column. This path now drops that column solely because its header starts with Unnamed:, so _set_meta() validates and stores the later Sample aliases instead of the actual sample columns, causing otherwise valid metadata to fail matching or select the wrong samples. Please only discard the unnamed column when its values are clearly an exported row counter, or treat this case as ambiguous.

Useful? React with 👍 / 👎.

@byemaxx

byemaxx commented Jul 11, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 16e8ef4b82

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@byemaxx
byemaxx merged commit 13930f9 into main Jul 11, 2026
2 checks passed
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