write_fasta: Write a fasta file to directory to use for whatever, e.g.,...

Description Usage Arguments Examples

View source: R/write_fasta.r

Description

Write a fasta file to directory to use for whatever, e.g., running Clustal for multiple sequences alignment.

Usage

1
write_fasta(sequences, fileout, format = "bayesian")

Arguments

sequences

A list of sequences.

fileout

A file to write to, e.g., mysequences.fas

format

one of Bayesian or maxlik (for maximum likelihood).

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Note that they are all the same sequence
myseqs <- c("TCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATATCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATA",
	"TCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATATCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATA",
	"TCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATATCTTATTTACAATAGGAGGATTATCAGGAATTATATTATCAAATTCATCTATTGATATTATACTACACGATACTTATTACGTTATTGGACACTTTCATTATGTACTCTCAATA")
names(myseqs) <- c("Apis_mellifera","Homo sapiens","Helianthus annuus")
write_fasta(sequences=myseqs, fileout="myseqs.fas")

## End(Not run)

sckott/sacbox documentation built on May 26, 2017, 3:47 a.m.