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

Description Usage Arguments Value Author(s) Examples

View source: R/rename.fasta.R

Description

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

Usage

1
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

Examples

1
2
3
4
# example fasta file
seqs <- system.file("nt.fa",package = "LTRpred")
# rename headers in file by adding species name: "Athaliana"
rename.fasta(file = seqs, species = "Athaliana", output = "Athaliana.fa")

HajkD/LTRpred documentation built on Oct. 20, 2018, 12:39 a.m.