\name{WriteFasta} \alias{writeFasta} \alias{strWriteFasta} \title{Write sequences into fasta file format} \description{ Write one or more parts of sequences into Fasta file format. } \usage{ writeFasta(file ="data.fasta",seqno = 0, from = getBegSeq(seqno), to = getEndSeq(seqno), name = getAccn(seqno), comment = paste("from", from, "to", to), cpl = 60, append = FALSE) strWriteFasta(s,file="data.fasta", name="Seq_R", comment=as.character(nchar(s)), cpl=60,append = FALSE) } \arguments{ \item{seqno}{Integer, number of the sequence. (bufseq)} \item{s}{A character string containing the sequence} \item{from,to}{Begining and ending of sub-sequences to extract. Can be vectors. 0 represent the last nucleotide and 1 the first one. } \item{name}{Sequence name.} \item{comment}{Comment.} \item{file}{Output File.} \item{cpl}{Number of caracteres by line.} \item{append}{Scalar boolean. TRUE -> sequence is added at the end of the file. FALSE -> file is written over.} } \value{ 1 or -1 if error. } \author{L.Cottret} %\seealso{\code{\link{fasta.readSeq}}} \keyword{utilities} \examples{ s<-"cgtagctagctagctagctagctacgtagctagctgactgtcgat" placeString(s) from <- c(1,14) to <- c(10,0) writeFasta(file="bank.fasta",from =from, to=to, append=FALSE) strWriteFasta(s="ATGTCGTGGTaaattaatTTGGTCCC",file="bank.fasta",append=TRUE) ## Show file cat(paste(readLines("bank.fasta"),collapse='\n')) }