sub fetch_clone_by_accession
{ my ($self, $embl_acc) = @_;
my $q1 = qq(
SELECT
ss.database_seqnname,
csm.id_sequence,
csm.start_coordinate,
csm.end_coordinate,
csm.contig_orientation,
ss.database_source,
ss.is_current
FROM clone_seq cs,
clone_seq_map csm,
snp_sequence ss
WHERE cs.database_seqname = '$embl_acc'
AND cs.id_cloneseq = csm.id_cloneseq
AND csm.id_sequence = ss.id_sequence
AND ss.is_current = 1
);
my $sth;
eval {
$sth = $self->prepare($q1);
$sth->execute();
};
if ($@){
warn("ERROR: SQL failed in " . (caller(0))[3] . "\n$@");
return();
}
my ($nt_name, $id_seq, $clone_start, $clone_end, $clone_strand);
my @cloneinfo;
my %stats = map { $_ => 0 } qw(NT clone);
while (my @res = $sth->fetchrow_array) {
if ($res[0] =~ /NT_/) {
$stats{'NT'}++;
} else {
$stats{'clone'}++;
}
@cloneinfo = @res;
}
if (($stats{'NT'} + $stats{'clone'}) > 1) {
warning("Clone ($embl_acc) maps to more than one NTs ($stats{NT}) and/or clones ($stats{clones}).");
}
return (@cloneinfo); } |
sub track_name
{ my ($self) = @_;
die("ERROR: track_name called on Bio::EnsEMBL::ExternalData::Glovar::GlovarAdaptor!\n
It should be implemented by a derived class!\n");
}
1; } |
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _