Hi, i am stuck.
i have a file which contains various stretches of DNA in fasta format e.g
in which each record is separated by a newline.
I am trying to write code that will return all sequences containing more than 250 bases.
But i think i am getting confused with nested loops etc because although my program runs fine it still returns everything. can anyone help??
this is my code:
#! /usr/local/bin/perl -w
open (INPUT, $ARGV) or die "unable to open file";
my $count =0;
my $base = ("A"|"C"|"G"|"T");
my $ideal = 250;
$sequence = $_;
@array = ();
@array = split (/\n/, $sequence);
foreach $base ($sequence)
if ($count > $ideal)
i am new to perl and would appreciate any help.