I found that if my fasta file ends with a single line sequence then that sequence returned by Bioperl will have one nucleotide missing. If fasta file ends with the new line then it returns complete sequence. Don't understand why? Is this a requirement for fasta files to end with an empty new line?
This the code I am using
my $obj = $db->get_Seq_by_id($id);
my $seq = $obj->seq; # returns 36 or 35 nucleotides depending if last new line exists
my $length = $obj->length; # returns 36 or 35
And the fasta sequence:
gi|37423|emb|X04588.1| Human 2.5 kb mRNA for cytoskeletal tropomyosin TM30(nm) CCCTTTAAATTTCCCTTTAAATTTCCCTTTAAATTTT