AnsweredAssumed Answered

"Substitute" function not working properly

Question asked by JoelMG on Mar 13, 2013
Latest reply on Mar 13, 2013 by JoelMG

Title

"Substitute" function not working properly

Post

     I'd love help on this:  I'd like to take a DNA sequence (composed of A C G and T) and return the "reverse complement".  For example, the reverse complement of "AATTCC" would be "GGAATT" (A and T are complementary; C and G are complementary).  At the moment I'm breaking this up into two steps:

     First, I use a "Reverse" command (which I've defined) and I place the result into a new new text field.  This works perfectly.   CCCTTTCGTCTCGCGCG  is reversed to GCGCGCTCTGCTTTCCC .

     Last, I need to find the complement, by simply substituting A for T, C for G, G for C, and T for A  in the reversed sequence.  But what I have just is not working correctly:

     In the field "Reverse Oligo 1" I have   GCGCGCTCTGCTTTCCC 

     I use the calculation for a new field:

     Substitute (Reverse Oligo 1; ["A" ; "T"] ; ["G" ; "C"] ; ["T"; "A"]; ["C"; "G"])

     This yields:   GGGGGGAGAGGAAAGGG

     It should yield CGCGCGAGACGAAAGGG .  The "G" to "C" substitution is not working, while the other substitutions are working fine.  I've retyped this several times and switched things around, but it never works.

     Any advice?  Thanks.   Joel

Outcomes