bowtie2_samtools {Rbowtie2} | R Documentation |
This function can be use to call the bowtie2 wrapper which wraps
the bowtie2-align-s
and the bowtie2-align-l
binaries.
bowtie2_samtools( bt2Index, output, outputType = "sam", seq1 = NULL, seq2 = NULL, bamFile = NULL, ..., interleaved = FALSE, overwrite = FALSE )
bt2Index |
|
output |
|
outputType |
|
seq1 |
|
seq2 |
|
bamFile |
|
... |
Additional arguments to be passed on to the bowtie2 wrapper. See below for details. |
interleaved |
|
overwrite |
|
All additional arguments in ... are interpreted as
additional parameters to be passed to bowtie2 wrapper.
All of them should be Character
or Numeric
scalar.
You can put all additional arguments in one Character
(e.g. "–threads 8 –no-mixed") with white space separation,
or put them in different Character
(e.g. "–threads","8","–no-mixed").
Note that some arguments ("-x","–interleaved","-U","-1","-2","-b","-S") are
invalid if they are already handled as explicit function arguments.
See the output of bowtie2_usage()
for details about available parameters.
An invisible Integer
of call
status. The value is 0 when there is not any mistakes
Otherwise the value is non-zero.
Zheng Wei
Langmead, B., & Salzberg, S. L. (2012). Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), 357-359.
td <- tempdir() ## Building a bowtie2 index refs <- dir(system.file(package="Rbowtie2", "extdata", "bt2","refs"), full=TRUE) bowtie2_build(references=refs, bt2Index=file.path(td, "lambda_virus"),"--threads 4 --quiet",overwrite=TRUE) ## Alignments reads_1 <- system.file(package="Rbowtie2", "extdata", "bt2", "reads", "reads_1.fastq") reads_2 <- system.file(package="Rbowtie2", "extdata", "bt2", "reads", "reads_2.fastq") ## Sam file created bowtie2_samtools(bt2Index = file.path(td,"lambda_virus"), output = file.path(td,"example"), seq1 = reads_1, seq2 = reads_2, overwrite = TRUE) ## Bam file created bowtie2_samtools(bt2Index = file.path(td,"lambda_virus"), output = file.path(td,"example"), outputType = "bam", seq1 = reads_1, seq2 = reads_2, overwrite = TRUE)