#!/usr/bin/perl -w


my $sequences = $ARGV[0];

print "\nThe consensus pattern from Prosite is: $sequences";

my $number_of_aminoacids = ($sequences =~ s/\-/\-/g);

$sequences =~ s/\-//g;

$sequences =~ s/x/\./g;

$sequences =~ s/\{/\[\^\^/g;

$sequences =~ s/\}/\]/g;

$sequences =~ s/\(/\{/g;

$sequences =~ s/\)/\}/g;

print "\n\nThe translated consensus pattern is: $sequences";


$sequences =~ s/\.//g;

$sequences =~ s/\[//g;

$sequences =~ s/\]//g;

$sequences =~ s/\(//g;

$sequences =~ s/\)//g;

$sequences =~ s/\{//g;

$sequences =~ s/\}//g;

$sequences =~ s/\^//g;

$sequences =~ s/A//g;

$sequences =~ s/R//g;

$sequences =~ s/N//g;

$sequences =~ s/D//g;

$sequences =~ s/C//g;

$sequences =~ s/Q//g;

$sequences =~ s/E//g;

$sequences =~ s/G//g;

$sequences =~ s/H//g;

$sequences =~ s/I//g;

$sequences =~ s/L//g;

$sequences =~ s/K//g;

$sequences =~ s/M//g;

$sequences =~ s/F//g;

$sequences =~ s/P//g;

$sequences =~ s/S//g;

$sequences =~ s/T//g;

$sequences =~ s/W//g;

$sequences =~ s/Y//g;

$sequences =~ s/V//g;


my $motif_length;

my $zero = 0;


my $new_sequences = $sequences.$zero;

if ($new_sequences + 0 == 0) {$motif_length = $number_of_aminoacids
+ 1;} else {my $x = $new_sequences /=10; $motif_length =
$number_of_aminoacids + $x;}

print "\n\nLength of motif is $motif_length\n";


exit;
