Struggling this problem I recognised that it can be solved better using BioPerl module. I read carefully the installation instructions for Windows here http://www.bioperl.org/wiki/Installing_Bioperl_on_Windows#Installation_using_CPAN_or_manual_installation. It seems to be rather simple bur I failed plenty of times trying to do it. I used PPM in ActivePerl 5.12. I have added all the repository listed in the table. And when I select View >> All Packages there is no bioperl available. So this is a problem and I can't recognise what I am doing wrong. Will you be so kind to suggest we the way to modify my perl script or help with BioPerl installation? Thanks a lot!$string_filename = 'sequence.txt'; open(FILE, $string_filename) || die("Couldn't read file $string_filena +me\n"); $motif_filename = 'motif.txt'; open(MOTIF, $motif_filename) || die("Couldn't read file $motif_filenam +e\n"); local $/ = "\n>"; while (my $seq = <FILE>) { chomp $seq; $seq =~ s/^>*.+\n//; $seq =~ s/\n//g; $R = length $seq; $motif = <MOTIF>; chomp $motif; $motif =~ s/^>*.+\n//; $motif =~ s/\n//g; if ( $seq =~ /$motif/ ) { ## insert actual binding site $M = $'; $W = length $M; if ( $seq =~ /[A-Z]/) { ## exon start $K = $`; $Z = length $K; $x = $W + $Z - $R; print "\n\ the distance is the following: $x\n\n"; } else { print "\n\ I couldn't find the start codon.\n\n"; } } else { print "\n\ I couldn't find the binding site.\n\n"; } } close MOTIF; close FILE; exit;
In reply to How to find any of many motifs? by Nikulina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |