Description Usage Arguments Details Value Original code in Darwin Author(s) See Also Examples
NucleotideContent
Computes for a gene or a database entry the content of nucleotides
1 | NucleotideContent(tD = mylist(whatout = 1), pos = c(1, 2, 3))
|
pos |
List of 3 positive integers for the nucleotide positions |
td |
Dictionary of String and Entry # nope probably either string or Entry type |
Should compute the same CP as in Darwin
Vector of four fractions (for every base) of nucleotide content in all bases
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | NucleotideContent := proc( ; tD:{string, Entry}, pos=[1,2,3]:list(posint)) -> list;
o := CreateArray(1..4);
n:=0;
if not assigned(tD) then
for z to DB[TotEntries] do
d:=SearchTag(DNA, Entry(z));
for i1 to length(d)-max(pos) by 3 do for i2 in pos do
i:=i1+i2;
n:=n+1;
o[BToInt(d[i])] := o[BToInt(d[i])]+1
od od;
od;
else
if type(tD, Entry) then d:=SearchTag('DNA', tD)
else d:=tD fi;
for i1 to length(d)-max(pos) by 3 do for i2 in pos do
i:=i1+i2;
n:=n+1;
o[BToInt(d[i])] := o[BToInt(d[i])]+1
od od;
fi;
return(o/n);
end:
|
Roth, A.; Friberg, M.; Siegrist, F. and Cannarozzi, G. M. gina@cannarozzi.com
1 2 3 4 | NucleotideContent('ATGTGGTACTCCGACTACGGAGGATAA', pos=c(1,2))
NucleotideContent(list("ABCDEFG", "ACGGCCGACGGTGT"), pos=3)
NucleotideContent(toupper(c2s(mylist(whatout=1)[[1]])))
NucleotideContent(pos=c(3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.