diff --git a/NAMESPACE b/NAMESPACE index 9866790..89d99d8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,7 @@ export(appmamba) export(appmamba_rc) export(arg) export(arg0) +export(bowtie2) export(bcftools) export(cellranger) export(cmd_background) diff --git a/NEWS.md b/NEWS.md index 25ee44b..5adf5f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,16 @@ * Rename `cmd_conda` to `cmd_codnaenv()`. +* new command `fastp` + +* new command `varscan` + +* new command `bcftools` + +* new command `snpEff` + +* new command `bowtie2` + # blit 0.2.0 ## New features diff --git a/R/cmd-bowtie2.R b/R/cmd-bowtie2.R new file mode 100644 index 0000000..9e3c592 --- /dev/null +++ b/R/cmd-bowtie2.R @@ -0,0 +1,63 @@ +#' Run bowtie2 +#' +#' Bowtie 2 is an ultrafast and memory-efficient tool +#' for aligning sequencing reads to long reference sequences. +#' It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters, +#' and particularly good at aligning to relatively long (e.g. mammalian) genomes. +#' Bowtie 2 indexes the genome with an FM Index to keep its memory footprint small: +#' for the human genome, its memory footprint is typically around 3.2 GB. +#' Bowtie 2 supports gapped, local, and paired-end alignment modes. +#' +#' @param index Path to bowtie2 index prefix (without file extensions). +#' @param reads A character vector of FASTQ files used as input to bowtie2. +#' @param ofile A string of path to the output sam file. +#' @param ... `r rd_dots("bowtie2")`. +#' @param bowtie2 `r rd_cmd("bowtie2")`. +#' @family command +#' @inherit exec return +#' @seealso +#' - +#' +#' `r rd_seealso()` +#' @export +bowtie2 <- make_command( + "bowtie2", + function( + index, + reads, + ofile, + ..., + bowtie2 = NULL + ){ + assert_string(bowtie2, allow_empty = FALSE, allow_null = TRUE) + Bowtie2$new( + cmd = bowtie2, + ..., + index = index, + reads = reads, + ofile = ofile + ) + } +) + +Bowtie2 <- R6Class( + "Bowtie2", + inherit = Command, + private = list( + alias = function() "bowtie2", + setup_help_params = function() "--help", + setup_command_params = function(index, reads, ofile){ + c( + arg0("-x", index), + if (length(reads) == 1L){ + arg0("-U", reads) + } else if (length(reads) == 2L){ + arg0("-1", reads[1], "-2", reads[2]) + } else { + cli::cli_abort("{.arg reads} must be of length 1 or 2") + }, + arg0("-S", ofile) + ) + } + ) +) diff --git a/man/allele_counter.Rd b/man/allele_counter.Rd index 7ad66ff..e426fff 100644 --- a/man/allele_counter.Rd +++ b/man/allele_counter.Rd @@ -43,6 +43,7 @@ between some other projects, specifically \code{AscatNGS} and \code{Battenberg}. } Other \code{commands}: +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/bowtie2.Rd b/man/bowtie2.Rd new file mode 100644 index 0000000..6d0563b --- /dev/null +++ b/man/bowtie2.Rd @@ -0,0 +1,57 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cmd-bowtie2.R +\name{bowtie2} +\alias{bowtie2} +\title{Run bowtie2} +\usage{ +bowtie2(index, reads, ofile, ..., bowtie2 = NULL) +} +\arguments{ +\item{index}{Path to bowtie2 index prefix (without file extensions).} + +\item{reads}{A character vector of FASTQ files used as input to bowtie2.} + +\item{ofile}{A string of path to the output sam file.} + +\item{...}{<\link[rlang:dyn-dots]{dynamic dots}> Additional arguments passed to \code{bowtie2} command. Empty arguments are automatically trimmed. If a single argument, such as a file path, contains spaces, it must be quoted, for example using \code{\link[=shQuote]{shQuote()}}. Details see: \code{cmd_help(bowtie2())}.} + +\item{bowtie2}{A string of path to \code{bowtie2} command.} +} +\value{ +A \code{command} object. +} +\description{ +Bowtie 2 is an ultrafast and memory-efficient tool +for aligning sequencing reads to long reference sequences. +It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters, +and particularly good at aligning to relatively long (e.g. mammalian) genomes. +Bowtie 2 indexes the genome with an FM Index to keep its memory footprint small: +for the human genome, its memory footprint is typically around 3.2 GB. +Bowtie 2 supports gapped, local, and paired-end alignment modes. +} +\seealso{ +\itemize{ +\item \url{https://bowtie-bio.sourceforge.net/bowtie2/index.shtml} +\item \code{\link[=cmd_wd]{cmd_wd()}}/\code{\link[=cmd_envvar]{cmd_envvar()}}/\code{\link[=cmd_envpath]{cmd_envpath()}}/\code{\link[=cmd_condaenv]{cmd_condaenv()}} +\item \code{\link[=cmd_on_start]{cmd_on_start()}}/\code{\link[=cmd_on_exit]{cmd_on_exit()}} +\item \code{\link[=cmd_on_succeed]{cmd_on_succeed()}}/\code{\link[=cmd_on_fail]{cmd_on_fail()}} +\item \code{\link[=cmd_parallel]{cmd_parallel()}} +} + +Other \code{commands}: +\code{\link{allele_counter}()}, +\code{\link{cellranger}()}, +\code{\link{conda}()}, +\code{\link{fastp}()}, +\code{\link{fastq_pair}()}, +\code{\link{gistic2}()}, +\code{\link{kraken2}()}, +\code{\link{kraken_tools}()}, +\code{\link{perl}()}, +\code{\link{pyscenic}()}, +\code{\link{python}()}, +\code{\link{samtools}()}, +\code{\link{seqkit}()}, +\code{\link{trust4}()} +} +\concept{command} diff --git a/man/cellranger.Rd b/man/cellranger.Rd index 3d58a79..6123025 100644 --- a/man/cellranger.Rd +++ b/man/cellranger.Rd @@ -48,6 +48,7 @@ cellranger( Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{conda}()}, \code{\link{fastp}()}, diff --git a/man/conda.Rd b/man/conda.Rd index a77cd79..b4f24af 100644 --- a/man/conda.Rd +++ b/man/conda.Rd @@ -29,6 +29,7 @@ Run conda Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{fastp}()}, diff --git a/man/exec.Rd b/man/exec.Rd index 24363a5..d8ed305 100644 --- a/man/exec.Rd +++ b/man/exec.Rd @@ -21,6 +21,7 @@ Invoke a System Command \itemize{ \item \code{\link[=allele_counter]{allele_counter()}} +\item \code{\link[=bowtie2]{bowtie2()}} \item \code{\link[=bcftools]{bcftools()}} \item \code{\link[=cellranger]{cellranger()}} \item \code{\link[=conda]{conda()}} diff --git a/man/fastp.Rd b/man/fastp.Rd index fe62c54..d6ca9a8 100644 --- a/man/fastp.Rd +++ b/man/fastp.Rd @@ -33,6 +33,7 @@ and quality control for FastQ data. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/fastq_pair.Rd b/man/fastq_pair.Rd index a424b25..e14e171 100644 --- a/man/fastq_pair.Rd +++ b/man/fastq_pair.Rd @@ -54,6 +54,7 @@ they demand paired end files have the same number of reads. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/gistic2.Rd b/man/gistic2.Rd index 6b919ef..fd616ba 100644 --- a/man/gistic2.Rd +++ b/man/gistic2.Rd @@ -51,6 +51,7 @@ deletion, and it lists genes found in each "wide peak" region. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/kraken2.Rd b/man/kraken2.Rd index 13f460c..e4e2a4b 100644 --- a/man/kraken2.Rd +++ b/man/kraken2.Rd @@ -57,6 +57,7 @@ given k-mer. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/kraken_tools.Rd b/man/kraken_tools.Rd index a0f820f..43aafc3 100644 --- a/man/kraken_tools.Rd +++ b/man/kraken_tools.Rd @@ -33,6 +33,7 @@ analysis of Kraken results. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/perl.Rd b/man/perl.Rd index 48c2918..c801407 100644 --- a/man/perl.Rd +++ b/man/perl.Rd @@ -30,6 +30,7 @@ years of development. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/pyscenic.Rd b/man/pyscenic.Rd index 4a815b4..ba7141c 100644 --- a/man/pyscenic.Rd +++ b/man/pyscenic.Rd @@ -30,6 +30,7 @@ Run pyscenic Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/python.Rd b/man/python.Rd index 5470219..5744f93 100644 --- a/man/python.Rd +++ b/man/python.Rd @@ -30,6 +30,7 @@ systems more effectively. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/samtools.Rd b/man/samtools.Rd index b2af24c..2f4bef6 100644 --- a/man/samtools.Rd +++ b/man/samtools.Rd @@ -32,6 +32,7 @@ systems more effectively. Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/seqkit.Rd b/man/seqkit.Rd index c753423..5c9d737 100644 --- a/man/seqkit.Rd +++ b/man/seqkit.Rd @@ -30,6 +30,7 @@ Run seqkit Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()}, diff --git a/man/trust4.Rd b/man/trust4.Rd index a40463c..4603269 100644 --- a/man/trust4.Rd +++ b/man/trust4.Rd @@ -85,6 +85,7 @@ data Other \code{commands}: \code{\link{allele_counter}()}, +\code{\link{bowtie2}()}, \code{\link{bcftools}()}, \code{\link{cellranger}()}, \code{\link{conda}()},