hiii alll
i wrote a prgm which would take position and strand from file 1 and tries to locate a string 250 characters ahead/before that position in anothe file (based on strand 0 or 1)
open my $fhConditions, "<", "1.txt" or die "Epic Fail: $!";
open my $fhCharacters, "<", "2.txt" or die "OMG Fail: $!";
my $length = 250;
while (my $line = <$fhConditions>) {
chomp $line;
my ($strand, $chr, $position) = split(' ', $line);
$position += $length if $strand == 0;
$position -= $length if $strand == 1;
seek $fhCharacters, $position, 0;
my $data;
read $fhCharacters, $data, $length;
if ($data =~ m/$AAGCTT/) {
print "Y" "\n";
else
print "N" "\n";
}
}
but it tells smthg like Missing $ on loop variable at restriction.pl line 8.
i am not able to sort it out plz help me
Moderator's Comments:
|
|
You need to follow posting rules. Your spelling is unacceptable and your code formatting is not acceptable to post here. I had to completely edit the very bad, careless spelling in the subject/title. See next post for a copy of the rules.
|
|