CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [BillKSmith] converting hash to AoH: Edit Log



Mr Keystrokes
Novice

Jul 26, 2017, 11:12 PM


Views: 9840
Re: [BillKSmith] converting hash to AoH

Wow, this is waay more elegant than I'm used to :)

What is the function of the @array in:


Code
push @spacers, map( $_->{spacer}, @$array);

Is it to instruct the computer to pick the spacer value from each and every array of hashes? And not just the first one.

The script is supposed to compare the spacers like CAGT ,
GTT and TTG together and detect whether they are the same. And if they are the same it is supposed to choose the spacer that is associated with the lowest energy score.
It would then, if possible, dispense of the arrays which have the same spacer but highest energy scores from %HoA_sequences.

After that in phase 2 entitled, 'may the best hairpin win', all the remaining hairpins are compared with each other to determine whether they overlap or not. If they do not overlap they are kept in the %HoA_sequences.
However, if any 2, or any 3 (etc) hashes overlap then similar to phase 1, the spacer with the lowest energy score is kept and the highest scored spacers are dispensed with, leaving %HoA_sequences containing only distinctive hairpins per sequence.
For phase 2, I will need to use the range between any given hairpin as in the start and end for determination of overlaps.


(This post was edited by Mr Keystrokes on Jul 28, 2017, 2:02 AM)


Edit Log:
Post edited by Mr Keystrokes (Novice) on Jul 28, 2017, 2:02 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives