This function merges two FASTA files (paternal and maternal) into a single output file, adding suffix identifiers to differentiate the sequences' origins.

merge_fasta_files(paternal_fa, maternal_fa, output_fa, tmp_dir = tempdir())

Arguments

paternal_fa

Character string. Path to the paternal FASTA file.

maternal_fa

Character string. Path to the maternal FASTA file.

output_fa

Character string. Path where the merged FASTA file will be written.

tmp_dir

Character string. Directory for temporary files. Default is tempdir().

Value

No return value, called for side effect of creating the merged FASTA file.

Details

The function adds "_paternal" suffix to sequence headers in the paternal file and "_maternal" suffix to sequence headers in the maternal file before concatenating them into a single output file.

Examples

if (FALSE) { # \dontrun{
merge_fasta_files(
  paternal_fa = "path/to/paternal.fa",
  maternal_fa = "path/to/maternal.fa",
  output_fa = "path/to/merged.fa"
)
} # }