The function MiscMetabar::cutadaptremoveprimers is to verbose, even when surrounding by…
- User
The function MiscMetabar::cutadapt_remove_primers is to verbose, even when surrounding by suppressMessages(invisible(capture.output(...)))
Assistant
The issue is that
system2()writes directly to the terminal — R'scapture.output()/suppressMessages()can't intercept it. The fix is to add averboseparameter and passstdout/stderrtosystem2.Let me check the roxygen docs before editing.
Assistant
Now I'll add a
verboseparameter to silencesystem2output:Assistant
Now format and update
NEWS.md:Assistant
Done. Here's what changed:
- Added
verbose = TRUEparameter tocutadapt_remove_primers(). - When
verbose = FALSE,system2()is called withstdout = FALSE, stderr = FALSE(discarding all system-level output) and the completionmessage()is skipped. - The docstring explains why standard R suppression functions don't work for system commands.
Usage:
cutadapt_remove_primers(..., verbose = FALSE).- Added