rm.sequence.fasta: Delete sequences from fasta file

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

Description

Delete sequences from fasta file

Usage

1
rm.sequence.fasta(infile, outfile = "sequence.removed.fasta", to.rm = NULL)

Arguments

infile

Character string representing the name of the fasta file.

outfile

Character string representing the name of the output fasta file.

to.rm

Vector of character string containing the names of sequences to be deleted.

Details

Delete sequences from a fasta file.

Value

This is a subroutine without return value.

Author(s)

Jinlong Zhang <jinlongzhang01@gmail.com>

References

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

See Also

read.fasta, dat2fasta

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
cat(
">seq_1",  "---TCCGCCCCCCTACTCTA",
">seq_3",  "CTCTCCGCCCCTCTACTCTA",
">seq_5",  "---TCCGCCC-TTTACTCTA",
">seq_6",  "---TCCGCCCCTCTACTCTA",
">seq_9",  "---TCCGCCC-TCTACTCTA",
">seq_12", "CTCTCCGCCC-TCTACTCTA",
file = "trn2.fasta", sep = "\n")

rm.sequence.fasta(infile = "trn2.fasta", to.rm = c("seq_1","seq_12"))

unlink("trn2.fasta")
unlink("sequence.removed.fasta")

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