in reply to Making use of a hash of an array...

In your example, I understand that 9 .. 38 is the "best hairpin," since it is the lowest start and highest end. Fair enough. But what if the ranges overlap? Say, you have 9 .. 38 and 8 .. 37?

Anyway, for populating your HOA, assuming the hsa_circ_... id is in $key, and the hairpin is delimited by $start and $end, you can use the following syntax:

$HoA_sequences{$key} = [$start, $end];

Replies are listed 'Best First'.
Re^2: Making use of a hash of an array...
by Peter Keystrokes (Beadle) on Jul 18, 2017 at 18:02 UTC
    Okay I will try that. I'm sure it's possible for those overlaps to occur but if given multiple options, I have to settle for the most energy stable hairpin, which is why prior to this stage the energy scores were filtered for the most stable ones. So far as I can detect there aren't any overlaps of the variety you describe.