NucleotideContent: Nucleotide Content

Description Usage Arguments Details Value Original code in Darwin Author(s) See Also Examples

Description

NucleotideContent Computes for a gene or a database entry the content of nucleotides

Usage

1
NucleotideContent(tD = mylist(whatout = 1), pos = c(1, 2, 3))

Arguments

pos

List of 3 positive integers for the nucleotide positions

td

Dictionary of String and Entry # nope probably either string or Entry type

Details

Should compute the same CP as in Darwin

Value

Vector of four fractions (for every base) of nucleotide content in all bases

Original code in Darwin

Compute Nucleotide content. AR (2006)

 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: 

Author(s)

Roth, A.; Friberg, M.; Siegrist, F. and Cannarozzi, G. M. gina@cannarozzi.com

See Also

seqinr statanacoseq readstats

Examples

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))

fredysiegrist/statanacoseq documentation built on May 16, 2019, 2:44 p.m.