in reply to Obtaining combinations of hash keys and values
Why not keep the fragments as pairs. The pairs can then combine to produce four alternatives.
1 => [ 'TTAAGTAGCATCGATTTATAGCATCGACTAGTAA', 'TTACTAGTCGATGCTATAAATCGA +TGCTACTTAA' ], 2 => [ ... ]
Or, you could keep only the F fragments, but assemble the four FF FR RF RR variants right as you combine two fragments. For example, write a sub that accepts two keys and returns four pairs as a list. Breaking down the problem into subroutines is a smart idea in any case. Using Algorithm::Combinatorics combinations() is then possible since you have one key per fragment/cognate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Obtaining combinations of hash keys and values
by Anonymous Monk on Apr 29, 2016 at 09:02 UTC |