WriteFasta {GeneR}R Documentation

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)

Arguments

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.

Value

seqno or -1 if error.

Author(s)

L.Cottret

Examples


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


[Package GeneR version 1.4.2 Index]