\name{CompoSeq} %\alias{compos.seq} \alias{compoSeq} \alias{strCompoSeq} \title{Composition in mono, di or trinucleotides of a sequence} \description{ Gives composition in mono, di or trinucleotides of fragments of a sequence Only A, T, G, C are counted, letter as U, X, S, M, N, are counted as 'X'. Flag "case" specify weather we take into acount letters in lower, upper ar all case. } \usage{ compoSeq(seqno=0, from=1, to=0, strand=getStrand(), wsize=1, p=TRUE,case="all",step=wsize) strCompoSeq(s, wsize=1, p=TRUE,case="all",step=wsize) } \arguments{ \item{seqno}{Integer/scalar, Sequence number (buffer number)} \item{s}{String/scalar, A sequence as character string} \item{wsize}{Integer/scalar, size of k-uples.} \item{from,to}{Integer/scalar, Absolute addresses of the beginning and the end of the fragment, (1 means the first nucleotide and 0 conventionally the last one; from must not be larger than to and both vectors must be the same size)} \item{strand}{Integer/vector, Strand (forward: 0, reverse: 1)} \item{p}{Logical/scalar, If p=TRUE, results are in pourcentages, else, results are in counts.} \item{case}{String/scalar, Case of the letters taken into account ("all", "upper", "lower")} \item{step}{Integer/scalar, Step increment of positions when counting words. } % \item{limites,comp}{Internal parameters} } \value{ A matrix with nucleotide composition for all regions (NxM where N = 5*wordSize and M = length(from)) If error: NULL } \note{.Use setStrand by default } \keyword{utilities} %\seealso{\code{\link{exact.word}}, \code{\link{make.profile}}, %\code{\link{scan.profile}}} \seealso{\code{\link{exactWord}}} \examples{ s<-"CGTACGTAGTAGCTAGCTAGCTAGCTAGCTGATCGATGCTAGCTGATCGATGCT" placeString(s) x<-c(1,8,15,50) y<-c(5,12,19,54) compoSeq(from =x, to = y,wsize=2) compoSeq(from =x, to = y,wsize=2,strand=1) compoSeq(from =x, to = y,wsize=2,step=2,p=FALSE) }