Rbowtie: Interface to bowtie

Description Usage Arguments Details Value Author(s) References Examples

Description

The following functions can be used to call the bowtie and bowtie-build binaries.

We recommend to use the QuasR package instead of using bowtie and bowtie_build directly. QuasR provides a simpler interface than Rbowtie and covers the whole analysis workflow of typical ultra-high throughput sequencing experiments, starting from the raw sequence reads, over pre-processing and alignment, up to quantification.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bowtie_build(references, outdir, ..., prefix = "index", force = FALSE,
strict = TRUE)

bowtie(sequences, index, ..., type = c("single", "paired", "crossbow"),
outfile, force = FALSE, strict = TRUE)

bowtie_build_usage()

bowtie_usage()

bowtie_version()

Arguments

references

Character vector. The path to the files containing the references for which to build a bowtie index.

outdir

Character scalar. The path to the output directory in which to store the bowtie index. If the directory already exists, the function function will cast an error, unless force==TRUE.

prefix

Character scalar. The prefix to use for the bowtie index files.

sequences

If type is either single or crossbow, a character vector of filenames if additional argument c==FALSE, otherwise a vector of read sequences. If type is paired, a list of filnames ore sequences of length 2, where the first list item corresponds to the fist mate pair sequences, and the second list item to the second mate pair sequences.

index

Character scalar. The path to the bowtie index and prefix to align against, in the form </path/to/index>/<prefix>.

type

Character scalar, one in c("single", "paired", "crossbow"). If single, the input sequences are interpreted as single reads. If paired, they are supposed to be mate pair reads and if crossbow, they are considered to be Crossbow-style reads.

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 outdir or outfile.

strict

Logical. Turn off strict checking of input arguments.

...

Additional arguments to be passed on to the binaries. See below for details.

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 bowtie binary will be ignored if they are already handled as explicit function arguments. See the output of bowtie_usage() and bowtie_build_usage() for details about available parameters.

Value

The output generated by calling the binaries. For bowtie_build this is typically a report of the index generation, for bowtie this can be a vector of aligments (if outfile is missing), otherwise an empty character scalar.

bowtie_usage() and bowtie_build_usage() return the usage information for the respective binaries.

bowtie_version() return the bowtie versions information.

Author(s)

Florian Hahne

References

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.

Examples

 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
td <- tempdir()

## Building a bowtie index
refs <- dir(system.file(package="Rbowtie", "samples", "refs"),
full=TRUE)
tmp <- bowtie_build(references=refs, outdir=file.path(td, "index"),
force=TRUE)
head(tmp)
dir(file.path(td, "index"))
tmp2 <- bowtie_build(references=refs, outdir=file.path(td,"indexColor"),
force=TRUE, C=TRUE)
dir(file.path(td, "indexColor"))
head(tmp2)


## Alignments
reads <- system.file(package="Rbowtie", "samples", "reads", "reads.fastq")
tmp <- bowtie(sequences=reads, index=file.path(td, "index", "index"))
tmp
bowtie(sequences=reads, index=file.path(td, "index", "index"),
outfile=file.path(td, "alignments.txt"), best=TRUE, force=TRUE)
readLines(file.path(td, "alignments.txt"))

bowtie(sequences=list("TGGGTGGGGTATTCTAGAAATTTCTATTAATCCT",
                      "TCTGTTCAAGTCAGATGGTCACCAATCTGAAGAC"),
index=file.path(td, "index", "index"), type="paired", c=TRUE)

Rbowtie documentation built on Nov. 8, 2020, 6:11 p.m.