File: syncodons.Rd

package info (click to toggle)
r-cran-seqinr 3.4-5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,876 kB
  • sloc: ansic: 1,987; makefile: 14
file content (113 lines) | stat: -rw-r--r-- 3,877 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
\name{syncodons}
\alias{syncodons}
\title{Synonymous codons}
\description{
  Returns all synonymous codons for each codon given
}
\usage{syncodons(codons, numcode = 1)}
\arguments{
  \item{codons}{ A sequence of codons as generated by \code{splitseq} }
  \item{numcode}{ The genetic code number as in \code{translate} }
}
\value{
  a list containing, for each codon given (list tags), all synonymous
  codons (including the original one)
}
\references{
  \code{citation("seqinr")}
}
\author{L. Palmeira, J.R. Lobry}
\seealso{ \code{\link{synsequence}} }
\examples{
#
# The four synonymous codons for Alanine in the standard genetic code:
#
syncodons("ggg")
#
# With a sequence:
#
toycds <- s2c("tctgagcaaataaatcgg")
syncodons(splitseq(toycds))
#
# Sanity check with the standard genetic code:
#
stdgencode <- structure(list(
  ttt = c("ttc", "ttt"), 
  ttc = c("ttc", "ttt"), 
  tta = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"),
  ttg = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"), 
  tct = c("agc", "agt", "tca", "tcc", "tcg", "tct"), 
  tcc = c("agc", "agt", "tca", "tcc", "tcg", "tct"), 
  tca = c("agc", "agt", "tca", "tcc", "tcg", "tct"), 
  tcg = c("agc", "agt", "tca", "tcc", "tcg", "tct"),
  tat = c("tac", "tat"), 
  tac = c("tac", "tat"), 
  taa = c("taa", "tag", "tga"),
  tag = c("taa", "tag", "tga"),
  tgt = c("tgc", "tgt"),
  tgc = c("tgc", "tgt"),
  tga = c("taa", "tag", "tga"), 
  tgg = "tgg", 
  ctt = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"), 
  ctc = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"), 
  cta = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"),
  ctg = c("cta", "ctc", "ctg", "ctt", "tta", "ttg"), 
  cct = c("cca", "ccc", "ccg", "cct"), 
  ccc = c("cca", "ccc", "ccg", "cct"), 
  cca = c("cca", "ccc", "ccg", "cct"), 
  ccg = c("cca", "ccc", "ccg", "cct"), 
  cat = c("cac", "cat"), 
  cac = c("cac", "cat"), 
  caa = c("caa", "cag"),
  cag = c("caa", "cag"),
  cgt = c("aga", "agg", "cga", "cgc", "cgg", "cgt"),
  cgc = c("aga", "agg", "cga", "cgc", "cgg", "cgt"),
  cga = c("aga", "agg", "cga", "cgc", "cgg", "cgt"),
  cgg = c("aga", "agg", "cga", "cgc", "cgg", "cgt"), 
  att = c("ata", "atc", "att"),
  atc = c("ata", "atc", "att"),
  ata = c("ata", "atc", "att"),
  atg = "atg",
  act = c("aca", "acc", "acg", "act"), 
  acc = c("aca", "acc", "acg", "act"),
  aca = c("aca", "acc", "acg", "act"),
  acg = c("aca", "acc",  "acg", "act"), 
  aat = c("aac", "aat"), 
  aac = c("aac", "aat"), 
  aaa = c("aaa", "aag"),
  aag = c("aaa", "aag"),
  agt = c("agc", "agt", "tca", "tcc", "tcg", "tct"),
  agc = c("agc", "agt", "tca", "tcc", "tcg", "tct"),
  aga = c("aga", "agg", "cga", "cgc", "cgg", "cgt"),
  agg = c("aga", "agg", "cga", "cgc", "cgg", "cgt"),
  gtt = c("gta", "gtc", "gtg", "gtt"),
  gtc = c("gta", "gtc", "gtg", "gtt"),
  gta = c("gta", "gtc", "gtg", "gtt"), 
  gtg = c("gta", "gtc", "gtg", "gtt"),
  gct = c("gca", "gcc", "gcg", "gct"),
  gcc = c("gca", "gcc", "gcg", "gct"),
  gca = c("gca", "gcc", "gcg", "gct"),
  gcg = c("gca", "gcc", "gcg", "gct"), 
  gat = c("gac", "gat"),
  gac = c("gac", "gat"),
  gaa = c("gaa", "gag"),
  gag = c("gaa", "gag"),
  ggt = c("gga", "ggc", "ggg", "ggt"),
  ggc = c("gga", "ggc", "ggg", "ggt"),
  gga = c("gga", "ggc", "ggg", "ggt"),
  ggg = c("gga", "ggc", "ggg", "ggt")),

.Names = c("ttt", "ttc", "tta", "ttg", "tct", "tcc", "tca", "tcg", "tat", "tac", 
"taa", "tag", "tgt", "tgc", "tga", "tgg", "ctt", "ctc", "cta", 
"ctg", "cct", "ccc", "cca", "ccg", "cat", "cac", "caa", "cag", 
"cgt", "cgc", "cga", "cgg", "att", "atc", "ata", "atg", "act", 
"acc", "aca", "acg", "aat", "aac", "aaa", "aag", "agt", "agc", 
"aga", "agg", "gtt", "gtc", "gta", "gtg", "gct", "gcc", "gca", 
"gcg", "gat", "gac", "gaa", "gag", "ggt", "ggc", "gga", "ggg"))
#
# Now the check:
#
currentresult <- syncodons(words(alphabet = s2c("tcag")))
stopifnot(identical(stdgencode, currentresult))
}
\keyword{ utilities }