\name{getOrfs}
\alias{getOrfs}
\alias{maxOrf}

\title{Gets ORFs from a sequence}
\description{
  Gets ORFs (Open Reading Frames) from a sequence. 
}
\usage{
getOrfs(phase = NULL,seqno=0,start="atg",
                   stop=c("taa","tag","tga"), complete = TRUE,suborfs=TRUE)
maxOrf(seqno=0,phase = NULL,start="atg",
                   stop=c("taa","tag","tga"), complete = TRUE)
}
\arguments{
 \item{seqno}{Integer/scalar, Sequence number (buffer number)}
 \item{phase}{Integer/scalar,. 1,2 or 3, NULL for all three phases}
 \item{start}{string/vector, start codons}
 \item{stop}{string/vector, stop codons}
 \item{complete}{Flag: true returns only complet Orfs, else return
   all Orfs.}
 \item{suborfs}{Flag: true returns all orfs including subparts of a
   large orf if it exists "atg" in the phase. False: does not returns
 sub-orfs.}
 
}

\value{
  getOrf returns a table of positions. NULL if no Orfs.
  
  maxOrf returns the size of the largest Orf, -1 if no Orf.

  All functions return NA if error.
}

\author{A. Lucas, Emna Marrakchi and Vincent Lefort}

\note{Reverse strand : not implemented}

\examples{
s<-"gtcatgcatgctaggtgacagttaaaatgcgtctaggtgacagtctaacaa"
placeString(s)

getOrfs(phase = NULL,seqno=0)
maxOrf()


# To get all ORFs on the reverse strand:
sc <- getSeq(0,1)
placeString(sc,seqno=1)
getOrfs(phase = NULL,seqno=1)

# All orfs on both strands :
rbind(getOrfs(seqno=0),getOrfs(seqno=1))
}
\keyword{utilities}