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!!!