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)
seqno |
Integer, number of the sequence. (bufseq) |
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. |
seqno or -1 if error.
L.Cottret
s<-"cgtagctagctagctagctagctacgtagctagctgactgtcgat" placeString(s) from <- c(1,14) to <- c(10,0) writeFasta(from =from, to=to, append=FALSE) #system("more data.fasta") #>no name 1 to 10 no comment #CGTAGCTAGC #>no name 142 to 0 no comment #TAGCTAGCTAG