write_fasta | R Documentation |
Writes sq
objects with their names to
a fasta file.
write_fasta(x, ...) ## S3 method for class 'sq' write_fasta( x, name, file, width = 80, NA_letter = getOption("tidysq_NA_letter"), ... ) ## S3 method for class 'data.frame' write_fasta( x, file, .sq = "sq", .name = "name", width = 80, NA_letter = getOption("tidysq_NA_letter"), ... )
x |
[ |
... |
further arguments to be passed from or to other methods. |
name |
[ |
file |
[ |
width |
[ |
NA_letter |
[ |
.sq |
[ |
.name |
[ |
Whenever a name has more letters than width
parameter, nothing
happens, as only sequences are split to fit within designated space.
No value is returned.
Functions from output module:
as.character.sq()
,
as.matrix.sq()
,
as.sq()
,
export_sq()
## Not run: sq_dna <- sq(c("ACTGCTG", "CTTAGA", "CCCT", "CTGAATGT"), alphabet = "dna_bsc") write_fasta(sq_dna, c("bat", "cat", "rat", "elephant_swallowed_by_A_snake"), tempfile()) ## End(Not run) # It can be a part of tidyverse pipeline: library(dplyr) fasta_file <- system.file(package = "tidysq", "examples/example_aa.fasta") read_fasta(fasta_file) %>% mutate(name = toupper(name)) %>% write_fasta(tempfile())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.