Package 'RbowtieCuda'

Title: An R Wrapper for nvBowtie and nvBWT, a rewritten version of Bowtie2 for cuda
Description: This package provides an R wrapper for the popular Bowtie2 sequencing read aligner, optimized to run on NVIDIA graphics cards. It includes wrapper functions that enable both genome indexing and alignment to the generated indexes, ensuring high performance and ease of use within the R environment.
Authors: c(Jacopo Pantaleoni [aut], Nuno Subtil [aut], Samuel Simon Sanchez [aut], Franck RICHARD [aut, cre], role = c("aut", "cre"))
Maintainer: Franck RICHARD <[email protected]>
License: BSD_3_clause + file LICENSE
Version: 1.7.0
Built: 2026-11-27 22:39:42 UTC
Source: https://github.com/bioc/RbowtieCuda

Help Index


Make system call for binaries

Description

Function that makes a system call for the RbowtieCuda binaries. Note that it is not designed to be used outside the package.

Usage

.callbinary2(bin1, args1, path = NULL)

Arguments

bin1

Character. The binary used for the system call.

args1

Character. The arguments to pass to the binary.

path

Character Optional: If passed to function, returns the path.

Value

An invisible Integer of call status. The value is 0 when there is not any mistakes.

Author(s)

Franck RICHARD

Examples

.callbinary2(bin1 = "nvBowtie", args1 = "--version")

Print unit tests

Description

Calling nvbio_tests() performs alignment tests

Usage

nvbio_tests()

Value

The return value is the string "nvbio test passed." when there is not any mistakes.

Author(s)

Franck RICHARD

Examples

nvbio_tests()

nvBowtie align function

Description

nvBowtie is a GPU-accelerated re-engineering of Bowtie2, a very widely used short-read aligner.

Usage

nvBowtie(index, output_file, options, seq1, seq2 = NULL)

Arguments

index

Character vector. Index file created by nvBWT.

output_file

Character vector. The alignment output file (.sam o .bam)

options

Character vector. Specify additional options here to customize the processing. For a complete list of available options, type nvBowtie_usage().

seq1

Character vector. For single-end sequencing, it contains sequence file paths. For paired-end sequencing, it can be file path with #1 mates paired with file paths in seq2.

seq2

Character vector. It contains file paths with #2 mates paired with file path in seq1. For single-end sequencoing files, it must be NULL.

Details

We’ve introduced several new features to nvBowtie. You can now perform alignments using the WFA method by including the --wfa (or --scoring wfa) parameter. The WFA method requires a large amount of RAM on the graphics card. We therefore recommend using an Nvidia card with 8GB or more. Please note that this feature is still experimental; it currently supports only end-to-end alignments and does not yet allow customization of scoring parameters. By default, it uses the following scoring: match:0, mismatch:1, gap_open:1 and gap_ext:1. Additionally, the --cache-writes parameter activates the asynchronous SAM writer for single-end alignments: output records are formatted and written by a background thread while the GPU aligns the next batches, giving a large speedup on sizeable outputs (about 100 MB of extra host RAM are used by the queue). It is not recommended for paired-end alignments and is ignored for BAM output. Pair it with --batch-size 64: --batch-size caps the number of reads per batch, in thousands of reads (minimum 16, default 1024); smaller batches overlap the alignment and the writing much better than the default.

Value

An invisible Integer of call status. The value is 0 when there is not any mistakes Otherwise the value is non-zero.

References

Langmead, B., & Salzberg, S. L. (2012). Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), 357-359.

Examples

td <- tempdir()

## Building index
fa_file <- system.file(package='RbowtieCuda', 'extdata', 'bt2', 'refs', 'lambda_virus.fa')
nvBWT(myinput=fa_file, output=file.path(td, 'index'), options='')

## Alignments
read_1 <- system.file(package='RbowtieCuda', 'extdata', 'bt2', 'reads', 'reads_1.fastq')
read_2 <- system.file(package='RbowtieCuda', 'extdata', 'bt2', 'reads', 'reads_2.fastq')

## Sam file created with paired-end files (paired mates are here reverse-forward)
nvBowtie(file.path(td, 'index'), file.path(td, 'my_result.sam'), options='--rf', seq1=read_1, seq2=read_2)

## Bam file created with single-end file
nvBowtie(file.path(td, 'index'), file.path(td, 'my_result.bam'), options='', seq1=read_1)

Print available arguments that can be passed to nvBowtie()

Description

Calling nvBowtie_usage() prints available arguments that can be passed to the nvBowtie() function.

Usage

nvBowtie_usage()

Value

An invisible Integer of call status. The value is 0 when there is not any mistakes Otherwise the value is non-zero.

Author(s)

Franck RICHARD

References

Langmead, B., & Salzberg, S. L. (2012). Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), 357-359.

Examples

nvBowtie_usage()

Print version information

Description

Calling nvBowtie_version() displays the version information of the RbowtieCuda package in use.

Usage

nvBowtie_version()

Value

An invisible Integer of call status. The value is 0 when there is not any mistakes.

Author(s)

Franck RICHARD

Examples

nvBowtie_version()

nvBWT : builds the BWT indices of the reference FASTA files

Description

This function can be use to call wrapped nvBWT binary.

Usage

nvBWT(myinput, output, options = NULL)

Arguments

myinput

Character vector. A path to a .fa file

output

Character vector. A path to a index file used for the alignment output.

options

Character vector. Options Example: --verbosity

Details

Available options:

-v       | --verbosity     int (0-6) [5]     // select the verbosity level
-m       | --max-length    int       [inf]   // clamp input length
-b       | --byte-packing  [default]         // output a byte-encoded .pac file
-w       | --word-packing                    // output a word-encoded .wpac file
                                             // (more efficient)
-c       | --crc                             // compute CRCs
-d       | --device                          // select a cuda device

Value

An invisible Integer of call status. The value is 0 when there is not any mistakes Otherwise the value is non-zero.

Author(s)

Franck RICHARD

References

Langmead, B., & Salzberg, S. L. (2012). Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), 357-359.

Examples

td <- tempdir()
fa_file <- system.file(package='RbowtieCuda', 'extdata', 'bt2', 'refs', 'lambda_virus.fa')
nvBWT(myinput=fa_file, output=file.path(td, 'index'), options='')