Skip to content

📝 CodeRabbit Chat: Fix Spectronaut CSV column selection for Datasets API - #20

Open
coderabbitai[bot] wants to merge 12 commits into
develfrom
coderabbitai/chat/8188f4e
Open

📝 CodeRabbit Chat: Fix Spectronaut CSV column selection for Datasets API#20
coderabbitai[bot] wants to merge 12 commits into
develfrom
coderabbitai/chat/8188f4e

Conversation

@coderabbitai

@coderabbitai coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code changes was requested by @Rudhik1904.

The following files were modified:

  • R/clean_spectronaut.R

tonywu1999 and others added 12 commits May 7, 2026 14:46
R/clean_spectronaut.R:9-12: added block_size parameter (default 16L * 1024L * 1024L) with coerce + validation.
R/clean_spectronaut.R:44: CsvReadOptions$create now uses the parameter.
R/converters.R:120-125: new @param block_size roxygen with the straddling-object workaround note.
R/converters.R:148-156: bigSpectronauttoMSstatsFormat gains block_size, plumbed to reduceBigSpectronaut.
tests/testthat/test-converters.R:97-163: validation tests (rejects negative/zero/NA/vector/string) + plumbing tests (default forwards 16 MiB, override forwards user's value).
man/bigSpectronauttoMSstatsFormat.Rd: regenerated from roxygen.
…setnames so the package is data.table-aware (cedta()).

R/clean_spectronaut.R:103-187: rewrote cleanSpectronautChunk in data.table:
setDT(input) at entry; subsequent operations modify in place via :=.
Two-step rename (setnames for standardize, then setnames with skip_absent = TRUE to map standardized→MSstats) matches the MSstatsConvert family pattern.
Conditional NA assignment uses mask form dt[cond, Intensity := NA_real_].
Q-value filters preserve dplyr::if_else NA semantics via explicit is.na(EGQvalue) | EGQvalue >= cutoff.
Dropped the leftover dplyr::collect(head(dplyr::select(...))) pattern — was a no-op residue from a prior refactor.
Function shrank from ~88 lines to ~64.
DESCRIPTION:20: added data.table to Imports.
NAMESPACE: regenerated, now imports :=, .SD, setDT, setnames from data.table.
tests/testthat/test-converters.R:97-211: 5 new tests — schema smoke test, filter_by_excluded, filter_by_identified, filter_by_qvalue (covering the NA-q-value case), and FFrgLossType row drop.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Author

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 42863392-72e7-4498-ac03-76027ed8b254

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@tonywu1999
tonywu1999 force-pushed the MSstatsBig/work/20260513_arrow_chunking_followups branch from 55132da to 74863fc Compare July 10, 2026 16:27
Base automatically changed from MSstatsBig/work/20260513_arrow_chunking_followups to devel July 10, 2026 16:40
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