Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export(trust4)
export(trust4_gene_names)
export(trust4_imgt_annot)
export(uninstall_appmamba)
export(varscan)
importFrom(R6,R6Class)
importFrom(rlang,":=")
importFrom(rlang,.data)
Expand Down
45 changes: 45 additions & 0 deletions R/cmd-varscan.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#' VarScan is a platform-independent software tool
#' developed at the Genome Institute at Washington University to detect variants in NGS data.
#'
#' @param subcmd Sub-Command of varscan. Details see: `r rd_help("varscan")`.
#' @param ... `r rd_dots("varscan")`.
#' @param varscan `r rd_cmd("varscan")`.
#' @seealso
#' - <https://varscan.sourceforge.net/>
#'
#' `r rd_seealso()`
#' @inherit exec return
#' @family command
#' @export
varscan <- make_command(
"varscan",
function(
subcmd = NULL,
...,
varscan = NULL
) {
assert_string(subcmd, allow_empty = FALSE, allow_null = TRUE)
assert_string(varscan, allow_empty = FALSE, allow_null = TRUE)
Varscan$new(
cmd = varscan,
...,
subcmd = subcmd
)
}
)

Varscan <- R6Class(
"Varscan",
inherit = Command,
private = list(
alias = function() "varscan",
setup_help_params = function() "help",
combine_params = function(subcmd) {
if (private$help) {
c(super$combine_params(), subcmd)
} else {
c(subcmd, super$combine_params())
}
}
)
)
3 changes: 2 additions & 1 deletion man/allele_counter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/cellranger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/conda.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/exec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/fastp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/fastq_pair.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/gistic2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/kraken2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/kraken_tools.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/perl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/pyscenic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/python.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/samtools.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/seqkit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/trust4.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions man/varscan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions tests/testthat/test-exec.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,29 @@ testthat::test_that("`pipe()` method works well", {
cmd_run()
testthat::expect_identical(read_lines(file), read_lines(file2))
})

testthat::test_that("`varscan()` works as expected", {
testthat::skip_if_not(nzchar(Sys.which("varscan")))
varscan() |> cmd_help()
})

testthat::test_that("`fastp()` works as expected", {
testthat::skip_if_not(nzchar(Sys.which("fastp")))
fastp() |> cmd_help()
})


testthat::test_that("`snpeff()` works as expected", {
testthat::skip_if_not(nzchar(Sys.which("snpeff")))
snpeff() |> cmd_help()
})

testthat::test_that("`bcftools()` works as expected", {
testthat::skip_if_not(nzchar(Sys.which("bcftools")))
bcftools() |> cmd_help()
})

testthat::test_that("`bowtie2()` works as expected", {
testthat::skip_if_not(nzchar(Sys.which("bowtie2")))
bowtie2() |> cmd_help()
})
Loading