Skip to content

readQFeatures(): don't ignore colData$quantCols#234

Merged
cvanderaa merged 6 commits intorformassspectrometry:masterfrom
alyst:respect_quant_cols
Oct 21, 2025
Merged

readQFeatures(): don't ignore colData$quantCols#234
cvanderaa merged 6 commits intorformassspectrometry:masterfrom
alyst:respect_quant_cols

Conversation

@alyst
Copy link

@alyst alyst commented Apr 23, 2025

I think the current version has a bug that, if there are no run information, the row names of colData are unconditionally assigned to the sampleNames (the column names of the data).
But the order of rows in colData might be different from sampleNames.
The correct behaviour should be to respect the quantCols as they are provided by the user (matching quantCols to sampleNames and reordering of colData rows happens later).

The current behaviour leads to errors in the downstream analysis (e.g. msqrob2), since matching data columns to the experimental design information is incorrect.

@lgatto
Copy link
Member

lgatto commented May 19, 2025

Hi Alexey, thank you for your PR. Could you provide a simple example that shows the issue and then make use of it in a unit test? I am happy to write the unit test myself if you aren't familiar with testthat, but the small example would be useful.

@alyst
Copy link
Author

alyst commented May 19, 2025

@lgatto I've added 2 unit tests with shuffled colData that fail without the fix.

@lgatto lgatto requested a review from cvanderaa May 26, 2025 16:58
@lgatto
Copy link
Member

lgatto commented May 26, 2025

Thank yo @alyst - we will review the PR before merging.

@lgatto lgatto self-requested a review May 26, 2025 17:00
Alexey Stukalov added 4 commits June 21, 2025 15:29
remove quantCols argument since it is not used,
and the rownames should be derived from colData$quantCols and colData$runCol
@alyst alyst force-pushed the respect_quant_cols branch from 897c2db to 3425ca3 Compare June 21, 2025 22:29
@alyst
Copy link
Author

alyst commented Aug 6, 2025

@cvanderaa @lgatto Could you please take a look at the PR -- I have tried to address your code review comments? Thank you!

@lgatto
Copy link
Member

lgatto commented Aug 6, 2025

Sorry for the delay. @cvanderaa - could you check and merge, please.

@lgatto
Copy link
Member

lgatto commented Aug 6, 2025

(FYI @alyst, Chris is on holidays until next week)

@cvanderaa cvanderaa merged commit a1488d0 into rformassspectrometry:master Oct 21, 2025
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.

3 participants