Description Usage Arguments Value See Also Examples
Read a fasta file and return a named vector of sequences.
1 |
file |
a fasta file |
a named vector of sequences
write_fasta to write sequences into a fasta file
1 2 3 4 5 6 7 8 9 10 11 12 | # Construct sequences as a named vector
seq1 = as.character(1:5)
names(seq1) = letters[1:5]
# Write sequences in a fasta format
fasta = tempfile()
writeLines(paste0(">", names(seq1), "\n", seq1), fasta)
# or alternatively, write_fasta(seq1)
# Read sequences with read_fasta
seq2 = read_fasta(fasta)
identical(seq1, seq2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.