Description Usage Arguments Details Value Original code in Darwin Author(s) See Also Examples
ComputeCarboneRA
calculates RA
1 2 | ComputeCarboneRA(target = 0.05, initfrac = 1, iterfrac = 0.5,
reverse = FALSE, DB = mylist(whatout = 1))
|
target |
nonnegative |
initfrac |
nonnegative |
reverse |
For standard anything else for non-standard |
DB |
Database with working genes of type Entires() |
interfrac |
nonnegative |
Should compute the same RA in Darwin
Named (codons) numerical vector with relative synonymous codon usage for the 64 codons
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 | ComputeCarboneRA := proc( ; t=0.01:nonnegative, initfrac=1:nonnegative, iterfrac=0.5:nonnegative, mode:string)
global RA;
if not assigned(DB) then error('DB must be assigned') fi;
x := 1; # fraction of the sequences used to compute RA in this iteration
AllGenes := [seq(i, i=1..DB[TotEntries])]:
genes := Shuffle(AllGenes)[1..round(initfrac * DB[TotEntries])]:
bestCorr := 0;
cai := CreateArray(1..DB[TotEntries]):
while length(genes) / DB[TotEntries] > t do
RA := RelativeAdaptiveness(genes);
for i to DB[TotEntries] do
dna:=SearchTag('DNA',Entry(i));
if SearchString('X', dna)<>-1 then next fi;
cai[i] := ComputeCAI(dna) od;
x := x * iterfrac;
res := transpose([AllGenes, cai]):
if mode='reverse' then
res := transpose(sort(res, res -> res[2])):
else
res := transpose(sort(res, res -> -res[2])):
fi;
genes := res[1][1..round(x * DB[TotEntries])]:
od;
RA
end:
|
Roth, A.; Friberg, M.; Siegrist, F. and Cannarozzi, G. M. gina@cannarozzi.com
RelativeAdaptiveness
statanacoseq
SetupRA
Entries
1 | ComputeCarboneRA(DB=mylist(whatout=1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.