in reply to Memory Usage in Regex On Large Sequence

Questions:

How many threads are you creating?
what sorts of strings does $motif contain? Is it anything other than A/C/G/T x N ? If so, what? Otherwise, what's the maximum length of $motif?

Dave.

  • Comment on Re: Memory Usage in Regex On Large Sequence

Replies are listed 'Best First'.
Re^2: Memory Usage in Regex On Large Sequence
by bernanke01 (Beadle) on Sep 25, 2006 at 18:02 UTC

    Hi,

    It's 10 threads, but repeats at 3 as well. For now, the motifs are just 6 strings of GCAT of 5 or 6 letters each. In theory I'd like to use more complex motifs of course. So, here are my current motif-list:

    GCGTG GTGCG CACGC CGCAC CACGTG GTGCAC
      In that case, I can't see any good reason why replacing index(..,"GTGCAC",...) with /GTGCAC/ should use any more memory, except that if $sequence is very large, and if somewhere in the program (eg from an included module), $`, $& or $' is used, then perl has to take a complete copy of $sequence each time, which might put you about the threshold.

      Dave.

        Ahh, interesting -- is there a way to verify if that is happening, or to prevent the copying from going on?