sub msa2msanum {
my $self = shift;
my $msa = shift;
+
+ if ( $msa =~ /(.+[^,])\s+(\w{2}(-\w{2})*)$/ ) {
+ $msa = "$1, $2";
+ }
+
my @msas = qsearch('msa', { 'description' => { 'op' => 'ILIKE',
'value' => "%$msa%", }
});
sub msatest {
my $self = shift;
my ($their,$our) = (shift,shift);
+
+ $their =~ s/^\s+//;
+ $their =~ s/\s+$//;
+ $their =~ s/\s+/ /g;
+ return 1 if $our eq $their;
+
my $a = $our;
$a =~ s/,.*?$//;
return 1 if $a eq $their;