overRep2Fasta {ngsReports} | R Documentation

## Write fasta of Over-Represented sequences.

### Description

Output overrepresented sequences to disk in fasta format.

### Usage

    overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)

    ## S4 method for signature 'ANY'
    overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)

    ## S4 method for signature 'FastqcData'
    overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)

    ## S4 method for signature 'FastqcDataList'
    overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)

### Arguments

`x` | Can be a `FastqcData` or `FastqcDataList`
`path` | Path to export the fasta file to. Reverts to a default in the working directory if not supplied
`n` | The number of sequences to output
`labels` | An optional named factor of labels for the file names. All filenames must be present in the names. File extensions are dropped by default.
`noAdapters` | logical. Remove any sequences identified as possible adapters or primers by FastQC
`...` | Used to pass any alternative patterns to remove from the end of filenames

### Details

Fasta will contain `Filename`, `Possible Source`, `Percent of total reads`

### Value

Exports to a fasta file, and returns the fasta information invisibly

### Examples

    # Get the files included with the package
    packageDir <- system.file("extdata", package = "ngsReports")
    fl <- list.files(packageDir, pattern = "fastqc.zip", full.names = TRUE)

    # Load the FASTQC data as a FastqcDataList object
    fdl <- FastqcDataList(fl)

    # Export the top10 Overrepresented Sequences as a single fasta file
    faOut <- file.path(tempdir(), "top10.fa")
    overRep2Fasta(fdl, path = faOut)

[Package ngsReports version 1.6.1 Index]