docs(Philosopher): Add examples for using Philosopher/Fragpipe converter#90
docs(Philosopher): Add examples for using Philosopher/Fragpipe converter#90tonywu1999 merged 3 commits intodevelfrom
Conversation
WalkthroughThe changes focus on improving documentation and testing for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
man/PhilosophertoMSstatsTMTFormat.Rd (1)
78-88: Consider wrapping the example in\\donttest{}to keep CRAN checks fast.Reading two files with
fread()and running the full converter is fine for users, but CRAN requires that examples run in < ~5 s on slow hardware. Wrapping the whole block in\donttest{}(or\dontrun{}if runtime is unpredictable) prevents timeouts while still rendering the code for users.-\examples{ - input_file_path = system.file("raw_data/Philosopher/msstats.csv", - package = "MSstatsTMT") - annotation_file_path = system.file("raw_data/Philosopher/MSstatsTMT_annotation.csv", - package = "MSstatsTMT") - input = data.table::fread(input_file_path) - annotation = data.table::fread(annotation_file_path) - msstats_format = PhilosophertoMSstatsTMTFormat(input, annotation) - head(msstats_format) - -} +\examples{ +\donttest{ +input_file_path <- system.file("raw_data/Philosopher/msstats.csv", + package = "MSstatsTMT") +annotation_file_path <- system.file("raw_data/Philosopher/MSstatsTMT_annotation.csv", + package = "MSstatsTMT") +input <- data.table::fread(input_file_path) +annotation <- data.table::fread(annotation_file_path) +msstats_format <- PhilosophertoMSstatsTMTFormat(input, annotation) +head(msstats_format) +} +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
inst/.DS_Storeis excluded by!**/.DS_Storeinst/raw_data/Philosopher/MSstatsTMT_annotation.csvis excluded by!**/*.csvinst/raw_data/Philosopher/msstats.csvis excluded by!**/*.csv
📒 Files selected for processing (6)
DESCRIPTION(1 hunks)R/converters.R(1 hunks)R/utils_MSstatsTMT.R(1 hunks)man/MSstatsTMT.Rd(1 hunks)man/PhilosophertoMSstatsTMTFormat.Rd(1 hunks)tests/testthat/test-converters.R(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (7)
R/utils_MSstatsTMT.R (1)
17-18: LGTM! Modern roxygen2 package documentation.The update from
@docType packageandNULLto@keywords internaland"_PACKAGE"follows current roxygen2 best practices for package-level documentation. This modernizes the documentation structure without affecting functionality.man/MSstatsTMT.Rd (2)
40-41: LGTM! Author list updated.The addition of Tony Wu and Deril Raju to the author list is appropriate and maintains proper attribution.
47-47: LGTM! Documentation consistency maintained.The addition of the
internalkeyword aligns with the corresponding changes inR/utils_MSstatsTMT.R, maintaining consistency across the package documentation.R/converters.R (1)
335-344: Excellent example documentation!The added example code demonstrates proper usage of the
PhilosophertoMSstatsTMTFormatfunction with realistic data loading usingsystem.file()anddata.table::fread(). This follows the established pattern from other converter functions and provides users with a clear, executable example.DESCRIPTION (1)
26-26: LGTM! Routine roxygen2 version update.The update from RoxygenNote 7.3.1 to 7.3.2 is a standard maintenance task that aligns with the documentation improvements throughout the package.
tests/testthat/test-converters.R (1)
30-41: Excellent test coverage addition!The new test case for
PhilosophertoMSstatsTMTFormatfollows good testing practices by:
- Loading realistic test data using the same approach as the documentation example
- Verifying the function executes successfully
- Asserting a specific expected outcome (550 rows)
- Following the established testing pattern in the file
This provides valuable regression protection for the converter function.
man/PhilosophertoMSstatsTMTFormat.Rd (1)
80-84: Verify that the example data files are installed with the package.
system.file("raw_data/Philosopher/…", package = "MSstatsTMT")will return an empty string if those paths are not included underinst/at build time, causing the example (and the new test) to fail. Double-check that:
inst/raw_data/Philosopher/msstats.csvinst/raw_data/Philosopher/MSstatsTMT_annotation.csvare present and listed in
R/’s@examplefiles section or ininst/extdata, and that they are ≤ 5 MB to satisfy CRAN size limits.
Checklist Before Requesting a Review
Summary by CodeRabbit