[emboss-dev] makenucseq, error with completely random sequence?

Henrikki Almusa henrikki.almusa at helsinki.fi
Mon Jul 10 18:09:13 UTC 2006


Hello,

I went through the code that I submitted and wondered if there is in
fact an error in it :). When creating a completely random sequence we
use following string to make the random sequence

char seqCharNucPure[]   = "ACGTUacgtu";

This is then converted into list and random element is taken to make the
sequence. However later this is done

ajStrExchangeSetCC(&seqstr,"u","t")

which replaces all the occurrances of 'u' with 't'. Doesn't this mean
that the 't' is now overrepresented?

I used the seqCharNucPure in there hoping that some point that stucture
might be available without copy and paste of the code. However should
the program be changed to use little different version of the string
(which could then in that later situation added to ajseqtype.c).

char seqCharNucDnaPure[]   = "ACGTacgt";

So something like this (untested)?
--- makenucseq.c        2006-07-10 05:49:55.000000000 +0000
+++ makenucseq.c.fix    2006-07-10 11:24:53.000000000 +0000
@@ -125,7 +125,6 @@
         ajStrFmtLower(&seqstr);
         seq = ajSeqNew();

-       ajStrExchangeSetCC(&seqstr,"u","t");
         if (extra < 0)
             ajStrCutStart(&seqstr,extra);
         ajSeqAssignSeqS(seq, seqstr);
@@ -184,12 +183,12 @@
      int i;
      int max;
      char *chars;
-    char seqCharNucPure[]   = "ACGTUacgtu";
-    int  seqCharNucPureLength = 10;
+    char seqCharNucDnaPure[]     = "ACGTacgt";
+    int  seqCharNucDnaPureLength = 8;
      AjPStr tmp;

-    chars = seqCharNucPure;
-    max = seqCharNucPureLength;
+    chars = seqCharNucDnaPure;
+    max = seqCharNucDnaPureLength;

      for (i = 0; i < max; i++)
      {

Regards,
--
Henrikki Almusa



More information about the emboss-dev mailing list