Description Usage Arguments Details Value Author(s) References Examples
The following functions can be used to call the bowtie2 and bowtie2-build binaries.
1 2 3 4 5 6 7 8 9 | bowtie2_build(references, outdir, ..., prefix = "index", force = FALSE,
strict = TRUE)
bowtie2(sequences, index, ..., type = c("single", "paired", "crossbow"),
outfile, force = FALSE, strict = TRUE)
bowtie2_build_usage()
bowtie2_usage()
|
references |
Character vector. The path to the files containing the references for which to build a bowtie2 index. |
outdir |
Character scalar. The path to the output directory in
which to store the bowtie2 index. If the directory already exists,
the function function will cast an error, unless
|
prefix |
Character scalar. The prefix to use for the bowtie2 index files. |
sequences |
If |
index |
Character scalar. The path to the bowtie2 index and prefix
to align against, in the form |
type |
Character scalar, one in |
outfile |
Character scalar. A path to a files used for the alignment output. If missing, the alignments will be returned as a regular R character vector. |
force |
Logical. Force overwriting of |
strict |
Logical. Turn off strict checking of input arguments. |
... |
Additional arguments to be passed on to the binaries. See below for details. |
All additional arguments in ...
are interpreted as additional
parameters to be passed on to the binaries. For flags, those are
supposed to be logicals (e.g., quiet=TRUE
will be translated
into --q
, q=TRUE
in -q
, and so on). Parameters
with additional input are supposed to be character or numeric vectors,
where the individual vector elements are collapsed into a single
comma-separated string (e.g., k=2
is translated into k
2
, bmax=100
into --bmax 100
, 3=letters[1:3]
into
-3 a,b,c
, and so on). Note that some arguments to the bowtie2
binary will be ignored if they are already handled as explicit
function arguments. See the output of bowtie2_usage()
and
bowtie2_build_usage()
for details about available parameters.
The output generated by calling the binaries. For bowtie2_build
this is typically a report of the index generation, for
bowtie2
this can be a vector of aligments (if outfile
is
missing), otherwise an empty character scalar.
bowtie2_usage()
and bowtie2_build_usage()
return the usage
information for the respective binaries.
Anita Lerch
Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
Langmead B, Schatz M, Lin J, Pop M, Salzberg SL. Searching for SNPs with cloud computing. Genome Biology 10:R134.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | td <- tempdir()
## Building a bowtie2 index
refs <- dir(system.file(package="Rbowtie2", "samples", "refs"),
full=TRUE)
tmp <- bowtie2_build(references=refs, outdir=file.path(td, "index"),
force=TRUE)
head(tmp)
dir(file.path(td, "index"))
tmp2 <- bowtie2_build(references=refs, outdir=file.path(td,"indexColor"),
force=TRUE, C=TRUE)
dir(file.path(td, "indexColor"))
head(tmp2)
## Alignments
reads <- system.file(package="Rbowtie2", "samples", "reads",
"reads.fastq")
tmp <- bowtie2(sequences=reads, index=file.path(td, "index", "index"))
tmp
bowtie2(sequences=reads, index=file.path(td, "index", "index"),
outfile=file.path(td, "alignments.txt"), best=TRUE, force=TRUE)
readLines(file.path(td, "alignments.txt"))
bowtie2(sequences=list("TGGGTGGGGTATTCTAGAAATTTCTATTAATCCT",
"TCTGTTCAAGTCAGATGGTCACCAATCTGAAGAC"),
index=file.path(td, "index", "index"), type="paired", c=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.