| Calling Sequence | ProbSeq(ProbVec,CharMap)
| ||||||||||||
| Parameters |
| ||||||||||||
| Methods | print, Sequence, type | ||||||||||||
| Synopsis | ProbSeq stores a generic (i.e. any type of sequence - amino acid, nucleotides, codons or others) probabilistic sequence in the form of a probability vectors. Hence each position of the sequence is a vector giving the probability of each possible character. The sum of the probabilities at each position is 1 except vectors containing only zeros denoting a gap at this position. The ProbSeq can alternatively be constructed with a sequence as a string and a mapping function (typically one of IntToA, IntToB or CIntToCodon). It will then automatically construct a probabilistic sequence with a 1 for the known character and 0 otherwise. If only the probabilistic vectors are given, the constructor tries to find the appropriate mapping function based on the number of characters. | ||||||||||||
| Examples | > ps1 := ProbSeq('ADRIAN',IntToA);
ps1 := ProbSeq([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0 , 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],IntToA) > ps2 := ProbSeq([[.5,0,.5,0],[.3,.7,0,0]]); ps2 := ProbSeq([[0.5000, 0, 0.5000, 0], [0.3000, 0.7000, 0, 0]],IntToB) > print(ps2); pos Most probable chars 1 A 0.50 G 0.50 2 C 0.70 A 0.30 | ||||||||||||
| See also | CIntToCodon, IntToA, IntToB, PASfromMSA, PASfromTree, ProbAncestor, PSDynProg | ||||||||||||