Output overrepresented sequences to disk in fasta format.
overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)
# S4 method for class 'ANY'
overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)
# S4 method for class 'FastqcData'
overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)
# S4 method for class 'FastqcDataList'
overRep2Fasta(x, path, n = 10, labels, noAdapters = TRUE, ...)
Can be a FastqcData
or FastqcDataList
Path to export the fasta file to. Reverts to a default in the working directory if not supplied
The number of sequences to output
An optional named factor of labels for the file names. All filenames must be present in the names. File extensions are dropped by default.
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
Exports to a fasta file, and returns the fasta information invisibly
Fasta will contain Filename
, Possible Source
,
Percent of total reads
# 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)
#> Warning: Unknown or uninitialised column: `Sequence`.
#> Warning: Unknown or uninitialised column: `Sequence`.