Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: convert ambiguous letters in a DNA sequence to all possible non-ambiguous letters

by BrowserUk (Pope)
on Feb 16, 2013 at 01:29 UTC ( #1018995=note: print w/ replies, xml ) Need Help??


in reply to convert ambiguous letters in a DNA sequence to all possible non-ambiguous letters

For strings with upto say a half a dozen or so wildcards, glob does this quite efficiently:

$in = 'ARGBCTC';; $in =~ s[[^ACGT]][{A,C,G,T}]g;; print $in;; A{A,C,G,T}G{A,C,G,T}CTC print for glob $in;; AAGACTC AAGCCTC AAGGCTC AAGTCTC ACGACTC ACGCCTC ACGGCTC ACGTCTC AGGACTC AGGCCTC AGGGCTC AGGTCTC ATGACTC ATGCCTC ATGGCTC ATGTCTC

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: convert ambiguous letters in a DNA sequence to all possible non-ambiguous letters
Download Code
Replies are listed 'Best First'.
Re^2: convert ambiguous letters in a DNA sequence to all possible non-ambiguous letters
by 7stud (Deacon) on Feb 16, 2013 at 02:55 UTC
    Gee whiz. That's clever.
Re^2: convert ambiguous letters in a DNA sequence to all possible non-ambiguous letters
by lrl1997 (Novice) on Feb 18, 2013 at 23:49 UTC

    so smart!!!! Thank you indeed!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-07-31 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls