combine_fasta: Combine fasta files into one

View source: R/batch.R

combine_fastaR Documentation

Combine fasta files into one

Description

Takes a directory full of fasta files, and combines them into a single one.

Usage

combine_fasta(
  fasta_dir,
  fasta_pattern,
  max_records,
  new_names = paste0("combined_", fasta_pattern, "_"),
  out_dir,
  fasta_files = list.files(fasta_dir, fasta_pattern, full.names = TRUE)
)

Arguments

fasta_dir

directory containing fasta files to combine

fasta_pattern

the pattern to match for fasta files (e.g. "NoHit")

max_records

optional, maximum number of records for each file. The total lines in each file will be twice this number (since records span two lines). If not provided, all files will be written to a single fasta file

new_names

character, the base of the name for the new combined files

out_dir

optional, if not provided combined files will be written into the same directory as input files.

fasta_files

vector of files to combine

Value

file names of new combined files

Author(s)

Matt Espe


fishsciences/metabarcode_utils documentation built on Feb. 25, 2024, 11:31 a.m.