get.fasta.name: get the names of all the sequences of fasta file

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

get the names of all the sequences of a fasta file, and perform cleaning of the names of the sequences

Usage

1
get.fasta.name(infile, clean_name = FALSE)

Arguments

infile

character string representing the name of the fasta file.

clean_name

logical, representing cleaning of the names will be performed.

Value

a character vector containing the names of the sequences

Note

Punctuation characters and white space be replaced by "_". Definition of Punctuation characters can be found at regex.

Author(s)

Jinlong Zhang <jinlongzhang01@gmail.com>

References

http://www.genomatix.de/online_help/help/sequence_formats.html

See Also

read.fasta, regex

Examples

1
2
3
4
5
6
7
8
9
  cat(
  ">seq_2", "GTCTTATAAGAAAGAATAAGAAAG--AAATACAAA-------AAAAAAGA",
  ">seq_3", "GTCTTATAAGAAAGAAATAGAAAAGTAAAAAAAAA-------AAAAAAAG",
  ">seq_5", "GACATAAGACATAAAATAGAATACTCAATCAGAAACCAACCCATAAAAAC",
  ">seq_8", "ATTCCAAAATAAAATACAAAAAGAAAAAACTAGAAAGTTTTTTTTCTTTG",
  ">seq_9", "ATTCTTTGTTCTTTTTTTTCTTTAATCTTTAAATAAACCTTTTTTTTTTA",
  file = "trn1.fasta", sep = "\n")
get.fasta.name("trn1.fasta")
unlink("trn1.fasta")

phylotools documentation built on May 2, 2019, 3:25 a.m.