Skip to contents

Write out sequences, as .fasta, for a given vector of IDs.

Usage

write_sqs(phylota, outfile, sid, sq_nm = sid, width = 80)

Arguments

phylota

Phylota

outfile

Output file

sid

Sequence ID(s)

sq_nm

Sequence name(s)

width

Maximum number of characters in a line, integer

Details

The user can control the output definition lines of the sequences using the sq_nm. By default sequences IDs are used. Note, ensure the sq_nm are in the same order as sid.

Examples

data('aotus')
# get sequences for a cluster and write out
random_cid <- sample(aotus@cids, 1)
sids <- aotus[[random_cid]]@sids
write_sqs(phylota = aotus, outfile = file.path(tempdir(), 'test.fasta'),
          sq_nm = 'my_gene', sid = sids)