Learn R Programming

eDNAfuns (version 0.1.0)

fasta_reader: Read FASTA or FASTQ files into a tibble

Description

Functions to read sequence files into a tidy data frame with one row per sequence.

Usage

fasta_reader(path_to_fasta)

fastq_reader(path_to_fastq, keepQ = FALSE)

Value

- `fasta_reader()`: A tibble with columns: - `header`: sequence identifiers (without the `>`). - `seq`: nucleotide sequences.

- `fastq_reader()`: A tibble with columns: - `header`: sequence identifiers (without the `@`). - `seq`: nucleotide sequences. - `Qscores` (optional): quality scores, if `keepQ = TRUE`.

Arguments

path_to_fasta

Character. Path to a FASTA file.

path_to_fastq

Character. Path to a FASTQ file.

keepQ

Logical. If `TRUE`, keep a third column with quality scores when reading FASTQ files. Default is `FALSE`.

Examples

Run this code

fasta_df <- fasta_reader(system.file("extdata", "test.fasta", package="eDNAfuns"))
fastq_df <- fastq_reader(system.file("extdata", "test.fastq", package="eDNAfuns"), keepQ = TRUE)


Run the code above in your browser using DataLab