Skip to content
Snippets Groups Projects
Commit 80bee16d authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Moved get_blank_factor to BaseParser.pm so it can be used elsewhere.

parent 8cf80cee
No related branches found
No related tags found
No related merge requests found
......@@ -290,30 +290,6 @@ sub parse {
}
sub get_blank_factor_id () {
my ($self, $db_adaptor) = @_;
my $sth = $db_adaptor->dbc->prepare("SELECT regulatory_factor_id FROM regulatory_factor WHERE name=''");
$sth->execute();
my ($factor_id) = $sth->fetchrow_array();
if ($factor_id) {
print "Found existing blank factor, id = $factor_id\n";
} else {
$db_adaptor->dbc->do("INSERT INTO regulatory_factor (name) VALUES ('')");
$sth->execute();
($factor_id) = $sth->fetchrow_array();
print "Created new blank factor, id = $factor_id\n";
}
return $factor_id;
}
sub new {
my $self = {};
......
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