Use grep to count the number of line with only one '+' (fastq, fastq.gz) or lines starting with a '>' (fasta) to count sequences.
Examples
count_seq(file_path = system.file(
"extdata",
"ex.fasta",
package = "MiscMetabar",
mustWork = TRUE
))
#> [1] 3
count_seq(
folder_path = system.file("extdata", package = "MiscMetabar"),
pattern = "*.fasta"
)
#> [1] 100 3 63 51 2 17