Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Comparing array of aligned sequences

by johngg (Canon)
on Jul 14, 2014 at 22:27 UTC ( [id://1093630]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Comparing array of aligned sequences
in thread Comparing array of aligned sequences

The glob function is your friend :-)

$ perl -Mstrict -Mwarnings -E ' my $rule = q{{c,g}} x 2; $rule .= q{{a,t,g,c}}; $rule .= q{{a,g}} x 3; $rule .= q{{a,t,g,c}}; $rule .= q{t}; $rule .= q{{a,t}} x 2; say $rule; say for glob $rule;' {c,g}{c,g}{a,t,g,c}{a,g}{a,g}{a,g}{a,t,g,c}t{a,t}{a,t} ccaaaaataa ccaaaaatat ccaaaaatta ccaaaaattt ccaaaattaa ccaaaattat ccaaaattta ccaaaatttt ccaaaagtaa ccaaaagtat ccaaaagtta ccaaaagttt ccaaaactaa ccaaaactat ... ggcgggatat ggcgggatta ggcgggattt ggcgggttaa ggcgggttat ggcgggttta ggcgggtttt ggcggggtaa ggcggggtat ggcggggtta ggcggggttt ggcgggctaa ggcgggctat ggcgggctta ggcgggcttt $

Hopefully I've understood your rules correctly and this is helpful.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^6: Comparing array of aligned sequences
by perlfan (Vicar) on Jul 15, 2014 at 15:43 UTC
    Wow. I learn something every day here. Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093630]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found