overRep2Fasta-methods: Write fasta of Over-Represented sequences.

Description Usage Arguments Details Value Examples

Description

Output overrepresented sequences to disk in fasta format.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)

ngsReports documentation built on Nov. 23, 2020, 2:01 a.m.