hellworld has asked for the wisdom of the Perl Monks concerning the following question:
$infile="input.txt"; open(IN, "$infile") or die "can'topen \"$infile\""; $genom=""; while($line=<IN>) { chomp $line; $genom.=$line; } @allprobes=(); for($x=0;$x<=$alltextlength-6;$x++) { $all= substr $genom, $j, 6; push(@allprobes,$all); } @probe=(); while($genom=~m/TATAAT.*?(ATG(...)*?(TAA|TAG|TGA))/g) { push (@gen, $1); } $cnt = 0; $k=0; $m=0; foreach $gen (@gen) { $length=length($gen); for($j=0; $j<$length-5; $j++) { $altilik= substr $gen, $j, 6; push (@probe,$altilik); while($allprobes[$m]=~m/$probe[$k]/g) { #push (@gen, $1); $cnt++; $k++; } $m++; #print "@probe\n\n\n"; #print @allprobes; } } print "$cnt\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: finding probes with one mutation ?
by almut (Canon) on Jun 01, 2009 at 20:38 UTC | |
by Marshall (Canon) on Jun 01, 2009 at 22:13 UTC | |
|
Re: finding probes with one mutation ?
by CountZero (Bishop) on Jun 02, 2009 at 07:14 UTC |