Description Usage Arguments Details Value Author(s) References Examples
This function can be use to call wrapped bowtie2
binary.
1 2 |
bt2Index |
|
samOutput |
|
seq1 |
|
... |
Additional arguments to be passed on to the binaries. See below for details. |
seq2 |
|
interleaved |
|
overwrite |
|
All additional arguments in ... are interpreted as
additional parameters to be passed on to
bowtie2. All of them should be Character
or
Numeric
scalar. You can put all aditional
arguments in one Character
(e.g. "–threads 8 –no-mixed")
with white space splited just like command line,
or put them in different Character
(e.g. "–threads","8","–no-mixed"). Note that some
arguments("-x","–interleaved","-U","-1","-2","-S") to the
bowtie2 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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")
if(file.exists(file.path(td, "lambda_virus.1.bt2"))){
cmdout<-bowtie2(bt2Index = file.path(td, "lambda_virus"),
samOutput = file.path(td, "result.sam"),
seq1=reads_1,seq2=reads_2,overwrite=TRUE,"--threads 3");cmdout
head(readLines(file.path(td, "result.sam")))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.