WriteFasta {GeneR} | R Documentation |
Write one or more parts of sequences into Fasta file format.
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)
seqno |
Integer, number of the sequence. (bufseq) |
s |
A character string containing the sequence |
from,to |
Begining and ending of sub-sequences to extract. Can be vectors. 0 represent the last nucleotide and 1 the first one. |
name |
Sequence name. |
comment |
Comment. |
file |
Output File. |
cpl |
Number of caracteres by line. |
append |
Scalar boolean. TRUE -> sequence is added at the end of the file. FALSE -> file is written over. |
1 or -1 if error.
L.Cottret
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'))