None available.
sub add_xref
{ my $self = shift;
my ( $source_id, $species_id, $xref ) = @_;
if ( !defined($add_xref_sth) ) {
my $dbh = $self->dbi();
$add_xref_sth = $dbh->prepare_cached($add_xref_sql);
if ( !defined($add_xref_sth) ) {
croak( $dbh->errstr() );
}
}
for my $required_key ( 'accession', 'chromosome',
'strand', 'txStart',
'txEnd', 'exonStarts',
'exonEnds' )
{
if ( !defined( $xref->{$required_key} ) ) {
croak(
sprintf( "Missing required key '%s' for Xref", $required_key )
);
}
}
$add_xref_sth->execute( $source_id, $species_id,
$xref->{'accession'}, $xref->{'chromosome'},
$xref->{'strand'}, $xref->{'txStart'},
$xref->{'txEnd'}, $xref->{'cdsStart'},
$xref->{'cdsEnd'}, $xref->{'exonStarts'},
$xref->{'exonEnds'}
) or croak( $add_xref_sth->errstr() );
}
1; } |