identify_adapters {Rbowtie2} | R Documentation

## identify adapters for paired-end reads

### Description

This function can be use to call wrapped `AdapterRemoval` binary for adapters identifying.

### Usage

    identify_adapters(file1, file2, ..., basename = NULL, overwrite = FALSE)

### Arguments

`file1` | `Character` vector. It can be file paths with #1 mates paired with file paths in file2 And it can also be interleaved file paths when argument interleaved=`TRUE`
`file2` | `Character` vector. It contains file paths with #2 mates paired with file paths in file1. For interleaved paired-end sequencing files(argument interleaved=`TRUE`),it must to be setted to `NULL`.
`...` | Additional arguments to be passed on to the binaries. See below for details.
`basename` | `Character`. The outputfile path prefix. Default: your_output
`overwrite` | `Logical`. Force overwriting of existing files if setting `TRUE`.

### Details

All additional arguments in ... are interpreted as additional parameters to be passed on to identify_adapters. All of them should be `Character` or `Numeric` scalar. You can put all aditional arguments in one `Character`(e.g. "–threads 8") with white space splited just like command line, or put them in different `Character`(e.g. "–threads","8"). Note that some arguments("–identify-adapters", "–file1","–file2","–basename") to the identify_adapters are invalid if they are already handled as explicit function arguments. See the output of `adapterremoval_usage()` for details about available parameters.

### Value

An invisible `Character` vector of adapters for each mate.

### Author(s)

Zheng Wei

### References

Schubert, Lindgreen, and Orlando (2016). AdapterRemoval v2: rapid adapter trimming, identification, and read merging. BMC Research Notes, 12;9(1):88.

### Examples

    td <- tempdir()
    reads_1 <- system.file(package="Rbowtie2", "extdata", "adrm", "reads_1.fq")
    reads_2 <- system.file(package="Rbowtie2", "extdata", "adrm", "reads_2.fq")
    adapters <- identify_adapters(file1=reads_1,file2=reads_2,
    basename = file.path(td,"reads")
    ,"--threads 2",overwrite=TRUE)
    adapters

[Package Rbowtie2 version 1.8.0 Index]