View source: R/write_alignment.R
write_alignment | R Documentation |
This function takes an alignment and exports it to a FASTA file.
write_alignment(alignment, file)
alignment |
An alignment. It may be a simple matrix or an object
obtained with |
file |
A file path. |
This function is run for its side effect of writing a file. But it
returns the file path passed in file
.
alignment <- matrix( c('P', 'M', 'I', 'P', 'I', 'I', 'P', 'L', 'I'), nrow = 3, byrow = TRUE ) # Export an alignment based on a matrix write_alignment(alignment, "my_alignment.fasta") cat(readLines("my_alignment.fasta"), sep = "\n") # Export one of the bundled alignments write_alignment(read_alignment(gene = 'BRCA1'), "BRCA1.fasta") cat(readLines("BRCA1.fasta")[1:10], sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.