Running SSAPs within your scripts

This is just a post to help people within the CATH group use our internal Perl modules (it may end up on CPAN, but probably not in the very near future..).

If you’ve got CATH Perl stuff setup okay then you should be able to type the following in a terminal

perldoc Cath::Ssap

and that documentation should help you get to a script like:

#!/usr/bin/env perl

use strict;
use warnings;

use Cath::Ssap;

my $cath_version = '3.5';

my $ssap = Cath::Ssap->new( query => '1oaiA00', match => '1oksA00', version => $cath_version );

my $result = $ssap->run(); # returns Cath::Ssap::Entry

print $result;

# 1oaiA00 1oksA00 59 50 71.82 40 67 2 4.20

$result->query; # 1oaiA00
$result->match; # 1oksA00
$result->query_length; # 59
$result->match_length; # 50
$result->ssap_score; # 71.82
$result->aligned_residues; # 40
$result->percent_overlap; # 67
$result->percent_identity; # 2
$result->rmsd; # 4.20
$result->simax; # 6.195

Obviously you’d need to change the version => ‘3.2’ to something more sensible (e.g. ‘3.5’ or ‘latest’)

If you’re doing tons of SSAPs then there are things to help with automating that too – have a look at:

perldoc Cath::SsapList
perldoc Cath::SsapList::Matrix

Finally, bear in mind we’ve already calculated the results of comparing domain SSAPs within superfamilies and stored them in the database:

perldoc Cath::SsapList::DBIC

If any of that code saves you any time, then please feel free to repay some of that time by adding documentation to those files…