rename.fasta: Helper function to add species names to headers within fasta...

View source: R/rename.fasta.R

rename.fastaR Documentation

Helper function to add species names to headers within fasta files

Description

Reads a fasta file and adds the defined species name to each header entry of the input fasta file.

Usage

rename.fasta(file, species, output = "renamed_fasta.fa", append = FALSE)

Arguments

file

input fasta file.

species

a character string specifying the species name to be added to the headers. Format will be: species_*, where * stands for the original header.

output

a character string denoting the name of the renamed output fasta file.

append

logical value. If TRUE output will be appended to file; otherwise, it will overwrite the contents of file.

Value

Writes a new fasta file with renamed headers.

Author(s)

Hajk-Georg Drost


HajkD/LTRpred documentation built on April 22, 2022, 4:35 p.m.