http://www.perlmonks.org?node_id=950981


in reply to Re: motif finding
in thread motif finding

I think using File::Slurp is even easier and more perl-ish :)

use File::Slurp; # read file as a string my $text = read_file('dna.txt'); # now remove whitespace including line breaks $text =~ s/\s+//g; # ...do stuff
(update : removed a stray space)

Replies are listed 'Best First'.
Re^3: motif finding
by devi (Initiate) on Feb 03, 2012 at 06:08 UTC

    Thank you very much for the reply. In the code that i have used i am giving the input (the motif sequence). considering entire genome as a single string if i want the most repeated elements of say 20 base pairs in the entire string how can i find it?

      I'm not sure what you're looking for, can you explain with a simple example?

      Are you looking for repeats of given string or something more complex?