div: Computation of the synonymous divergence between sequences

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The divergence between DNA sequences can be synonymous (neutral) or non-synonymous. Synonymous differences are generally considered as a better proxy for evolutionary divergence, as it is not affected by selection. This function computes the synonymous divergence between sequences.

Usage

1
2
div(file = NULL, sequence = NULL, sqs = NULL, method = "LWL85", 
	pairwise = TRUE, max.lim = 3)

Arguments

file

FASTA file in which aligned sequences are stored.

sequence

Alternatively, the result of seqinr::read.fasta.

sqs

Vector of sequence names to be compared. If not provided, all pairwise comparisons will be performed.

method

Method used to compute the divergence. So far, only the LWL85 method (from Li et al. 1985).

pairwise

Boolean: should the divergence be calculated for each pair of sequences or on the whole dataset? This is of particular importance when indels (gaps) are present in sequences, as codons with gaps are generally discarded by most methods. Setting this option to TRUE is thus more likely to give accurate results with multiple-gap sequences, but the calculation will also be slower.

max.lim

Maximum value for divergence. Depending on the algorithm, various corrections can bring the divergence value above 100%. Values larger than max.lim will be replaced by NAs, as they can be problematic for further statistical tests.

Details

The LWL85 method is a wrapper around the kaks function from the seqinr package.

Value

A 3-column data frame with the following fields:

Author(s)

Aurelie Hua-Van and Arnaud Le Rouzic

References

Li, W. H., Wu, C. I., & Luo, C. C. (1985). A new method for estimating synonymous and nonsynonymous rates of nucleotide substitution considering the relative likelihood of nucleotide and codon changes. Molecular biology and evolution, 2(2), 150-174.

See Also

CUB

Examples

1
2
	seq.file <- system.file("extdata/Genes", "Amd.fas", package="vhica")
	div(seq.file)

Example output

            div  sp1  sp2
1   0.802154470 dana dbia
2   0.250528697 dana dbip
3   0.768980826 dana dele
4   0.935333495 dana dere
5   1.146416615 dana deug
6   1.010956393 dana dfic
7   1.840015836 dana dgri
8   0.749693529 dana dkik
9   0.919361755 dana dmel
10  1.471727493 dana dmoj
11  1.462662975 dana dper
12  1.505919587 dana dpse
13  0.906430668 dana drho
14  0.970858365 dana dsec
15  0.864657442 dana dsim
16  0.909739756 dana dtak
17  1.848969211 dana dvir
18  2.178144828 dana dwil
19  0.881897096 dana dyak
20  0.745596560 dbia dbip
21  0.395729013 dbia dele
22  0.451640640 dbia dere
23  0.690377738 dbia deug
24  0.580968396 dbia dfic
25  1.419697906 dbia dgri
26  0.632461531 dbia dkik
27  0.481346606 dbia dmel
28  1.288444679 dbia dmoj
29  1.202233740 dbia dper
30  1.223849857 dbia dpse
31  0.384051479 dbia drho
32  0.465733818 dbia dsec
33  0.461797152 dbia dsim
34  0.315180763 dbia dtak
35  1.467203824 dbia dvir
36           NA dbia dwil
37  0.490467065 dbia dyak
38  0.806950860 dbip dele
39  0.846942111 dbip dere
40  1.141955340 dbip deug
41  0.942877992 dbip dfic
42  2.080521769 dbip dgri
43  0.707612902 dbip dkik
44  0.867442810 dbip dmel
45  1.492551277 dbip dmoj
46  1.397873881 dbip dper
47  1.443865040 dbip dpse
48  0.935165082 dbip drho
49  0.941523199 dbip dsec
50  0.862944652 dbip dsim
51  0.893243156 dbip dtak
52  2.036724201 dbip dvir
53           NA dbip dwil
54  0.838710814 dbip dyak
55  0.404054267 dele dere
56  0.660456896 dele deug
57  0.400176120 dele dfic
58  1.440822390 dele dgri
59  0.715899191 dele dkik
60  0.509746510 dele dmel
61  1.205403105 dele dmoj
62  1.099380303 dele dper
63  1.118737883 dele dpse
64  0.241297206 dele drho
65  0.489967417 dele dsec
66  0.430727330 dele dsim
67  0.379215171 dele dtak
68  1.323469849 dele dvir
69  2.250248098 dele dwil
70  0.484205914 dele dyak
71  0.719992857 dere deug
72  0.458220070 dere dfic
73  1.610263103 dere dgri
74  0.736417018 dere dkik
75  0.235408243 dere dmel
76  1.401475602 dere dmoj
77  1.176136153 dere dper
78  1.182838604 dere dpse
79  0.496921084 dere drho
80  0.240933459 dere dsec
81  0.196240282 dere dsim
82  0.405434480 dere dtak
83  1.682657859 dere dvir
84           NA dere dwil
85  0.140566508 dere dyak
86  0.764062830 deug dfic
87           NA deug dgri
88  1.005406358 deug dkik
89  0.758831977 deug dmel
90  2.334715883 deug dmoj
91  1.449368526 deug dper
92  1.500756739 deug dpse
93  0.573423139 deug drho
94  0.763024730 deug dsec
95  0.759211468 deug dsim
96  0.596895696 deug dtak
97  2.003019572 deug dvir
98  1.990166512 deug dwil
99  0.701340279 deug dyak
100 1.551678445 dfic dgri
101 0.901062114 dfic dkik
102 0.515724156 dfic dmel
103 1.448816304 dfic dmoj
104 1.329916365 dfic dper
105 1.355441806 dfic dpse
106 0.478716237 dfic drho
107 0.527799599 dfic dsec
108 0.483323533 dfic dsim
109 0.448810329 dfic dtak
110 1.808356076 dfic dvir
111 1.935438705 dfic dwil
112 0.489097205 dfic dyak
113 2.023349125 dgri dkik
114 1.908618457 dgri dmel
115 1.383848003 dgri dmoj
116 1.491246499 dgri dper
117 1.504477312 dgri dpse
118 1.692967677 dgri drho
119 1.798408843 dgri dsec
120 1.686425953 dgri dsim
121 1.447561266 dgri dtak
122 0.827215948 dgri dvir
123          NA dgri dwil
124 1.698867298 dgri dyak
125 0.787175767 dkik dmel
126 1.925456760 dkik dmoj
127 1.443588221 dkik dper
128 1.468343405 dkik dpse
129 0.631167966 dkik drho
130 0.812549923 dkik dsec
131 0.761417709 dkik dsim
132 0.653020796 dkik dtak
133 2.089791852 dkik dvir
134 1.948512490 dkik dwil
135 0.817534240 dkik dyak
136 1.445312859 dmel dmoj
137 1.228045167 dmel dper
138 1.232209751 dmel dpse
139 0.571458493 dmel drho
140 0.136488741 dmel dsec
141 0.094870134 dmel dsim
142 0.465246647 dmel dtak
143 1.693900237 dmel dvir
144 1.939794712 dmel dwil
145 0.271647104 dmel dyak
146 1.451311994 dmoj dper
147 1.456005524 dmoj dpse
148 1.401909523 dmoj drho
149 1.475822427 dmoj dsec
150 1.377106508 dmoj dsim
151 1.346958940 dmoj dtak
152 0.817997958 dmoj dvir
153 1.906305431 dmoj dwil
154 1.545990495 dmoj dyak
155 0.007679779 dper dpse
156 1.225708101 dper drho
157 1.167501978 dper dsec
158 1.163192350 dper dsim
159 1.229672819 dper dtak
160 1.442414200 dper dvir
161 2.545369800 dper dwil
162 1.325093803 dper dyak
163 1.246600695 dpse drho
164 1.172634602 dpse dsec
165 1.168470707 dpse dsim
166 1.235381897 dpse dtak
167 1.431588411 dpse dvir
168          NA dpse dwil
169 1.332572570 dpse dyak
170 0.523624237 drho dsec
171 0.502769788 drho dsim
172 0.355296053 drho dtak
173 1.610604442 drho dvir
174          NA drho dwil
175 0.520210226 drho dyak
176 0.067527108 dsec dsim
177 0.477381729 dsec dtak
178 1.589814188 dsec dvir
179          NA dsec dwil
180 0.291068206 dsec dyak
181 0.435937442 dsim dtak
182 1.522833683 dsim dvir
183          NA dsim dwil
184 0.246757726 dsim dyak
185 1.532797411 dtak dvir
186          NA dtak dwil
187 0.458943881 dtak dyak
188          NA dvir dwil
189 2.524739403 dvir dyak
190          NA dwil dyak

vhica documentation built on March 2, 2020, 5:07 p.m.