seqinr (version 1.0-1)

comp: complement a nucleic sequence

Description

Complement a sequence, for instance if the sequence is "a","c","g","t" it returns "t","g","c","a". All other values will return NA.

Usage

comp(seq)

Arguments

seq
a vector of chars

Value

  • It returns a vector of character which is the complement of a sequence.

References

� To have an overview of the seqinR's functionnality, please consult this vignette: Charif, D., Lobry, J.R. (2005) SeqinR: a contributed package to the R project for statistical computing devoted to biological sequences retrieval and analysis. Springer Verlag, Biological and Medical Physics/Biomedical Series, in preparation.

Examples

Run this code
a=s2c("acgtgctcgtatatatatgccc")
   comp(a)		
   b=s2c("acgtXctcgtatatatatgccc")
   comp(b)

Run the code above in your browser using DataLab