in reply to weighting regex patterns
As for your question, what data structure do you have your 'matrix' in? How is it being represented in your program? I guess I don't understand your problem. I would think a hash would help you with this (but I may be wrong).
Then you could do:my %dna = ('nucleotide1' => {A => 25, T => 25, G => 25, C => 25}, 'nucleotide2' => {A => 10, T => 15, G => 50, C => 25}, etc... );
$dna{nucleotide2}->{T};
Which would give you the weight (15 in this case).
Cheers,
KM
|
|---|