Leser: 18
$seq =~ s/[\s\d>]+//g;
1 2 3 4 5 6 7
my $fasta = ">sp|P01815|HV2B_HUMAN Ig heavy chain V-II region COR - Homo sapiens (Human). QVTLRESGPALVKPTQTLTLTCTFSGFSLSSTGMCVGWIRQPPGKGLEWLARIDWDDDKY YNTSLETRLTISKDTSRNQVVLTMDPVDTATYYCARITVIPAPAGYMDVWGRGTPVTVSS "; my @parts = split /\n/, $fasta; my $sequence = join '', @parts[ 1 .. $#parts ];
1 2 3 4 5 6 7 8 9
use Bio::FASTASequence; my $fasta = ">sp|P01815|HV2B_HUMAN Ig heavy chain V-II region COR - Homo sapiens (Human). QVTLRESGPALVKPTQTLTLTCTFSGFSLSSTGMCVGWIRQPPGKGLEWLARIDWDDDKY YNTSLETRLTISKDTSRNQVVLTMDPVDTATYYCARITVIPAPAGYMDVWGRGTPVTVSS "; my $object = Bio:FASTASequence->new( $fasta ); my $sequence = $object->getSequence;