Skip to content
Snippets Groups Projects
Commit 6c4dd437 authored by Val Curwen's avatar Val Curwen
Browse files

added simple function get_id_by_internal_id
parent 349bb949
No related merge requests found
......@@ -68,5 +68,19 @@ sub get_internal_id_by_id
}
}
sub get_id_by_internal_id
{
my ($self, $internal_id) = @_;
my $sth = $self->db->prepare
(
"select id from contig where internal_id = '$internal_id'"
);
my $res = $sth->execute;
if(my $rowhash = $sth->fetchrow_hashref) {
return $rowhash->{id};
} else {
$self->warn("Could not find contig with internal_id $internal_id");
}
}
1;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment