XrefParser CoordinateParser
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Carp
Inherit
XrefParser::BaseParser
Synopsis
No synopsis!
Description
No description!
Methods
add_xref
No description
Code
Methods description
None available.
Methods code
add_xrefdescriptionprevnextTop
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;
}
General documentation
No general documentation available.