Can you explain why these might be different one run to the next: 285c285 < NT => ["A", 0.15, "C", 0.5, "G", 0.8, "T", 1], --- > NT => ["C", 0.35, "G", 0.65, "T", 0.85, "A", 1],
Yes, this is cumulative probability. In order to get the actual probability subtract the one you are interested from its previous if it has any. For example, P(A|NT) = 0.15 and also P(A|NT) = 1 - 0.85=0.15 . So, P(A|NT)=0.15, P(C|NT)=0.35, P(G|NT)=0.3, P(T|NT)=0.2
Because of the keys %hash always returning a random order of the keys, I could not avoid getting different representation of the same output without using an expensive sort. Likewise for not wasting memory by also calculating a "proper" probabilities in the way I have just shown you.
Btw, that last "N" => 3 is just your ngram-length.
Well, it seems you have created a frankestein. it will end in tears ... brrrrrrrr.
In reply to Re^4: n-dimensional statistical analysis of DNA sequences (or text, or ...)
by bliako
in thread n-dimensional statistical analysis of DNA sequences (or text, or ...)
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |