Conversation
There was a problem hiding this comment.
💡 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".
| # 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) |
There was a problem hiding this comment.
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 👍 / 👎.
|
@codex check the comment and review |
There was a problem hiding this comment.
💡 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".
| # 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) |
There was a problem hiding this comment.
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 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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:
FunctionExecutor.is_cancelled_resultclass 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:
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:
Samplecolumns, 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:
Docs/ChangeLog.md,metax/utils/version.py). [1] [2]