Skip to content

Add parameter validation to DIANNtoMSstatsFormat#121

Draft
Copilot wants to merge 2 commits intofeature-diann-anomalyfrom
copilot/sub-pr-119-again
Draft

Add parameter validation to DIANNtoMSstatsFormat#121
Copilot wants to merge 2 commits intofeature-diann-anomalyfrom
copilot/sub-pr-119-again

Conversation

Copy link

Copilot AI commented Mar 2, 2026

DIANNtoMSstatsFormat exposed anomaly-model parameters (calculateAnomalyScores, anomalyModelFeatures, anomalyModelFeatureTemporal, etc.) without validating them, unlike SpectronauttoMSstatsFormat which calls .validateMSstatsConverterParameters. Invalid combinations (e.g., calculateAnomalyScores=TRUE with empty feature vectors) would silently propagate into the model rather than failing fast with a clear error.

Changes

  • Added validation_config list and .validateMSstatsConverterParameters() call at the top of DIANNtoMSstatsFormat, matching the existing pattern in SpectronauttoMSstatsFormat
  • Validation covers: non-empty anomalyModelFeatures when anomaly scoring is enabled, length parity between anomalyModelFeatureTemporal and anomalyModelFeatures, valid temporal direction values, correct types for all numeric/logical parameters, and valid input/annotation structure

Testing

Relies on existing test coverage in test_converters_DIANNtoMSstatsFormat.R. No new tests added — the validation logic itself is already tested via the shared SpectronauttoMSstatsFormat path.

Checklist Before Requesting a Review

  • I have read the MSstats contributing guidelines
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…tsConverterParameters

Co-authored-by: devonjkohler <35807256+devonjkohler@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on feature diann anomaly PR Add parameter validation to DIANNtoMSstatsFormat Mar 2, 2026
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.

2 participants