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

Allow specification of motif ID

parent b4cb70eb
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ use Bio::EnsEMBL::Slice; ...@@ -9,7 +9,7 @@ use Bio::EnsEMBL::Slice;
use Bio::EnsEMBL::Analysis; use Bio::EnsEMBL::Analysis;
use Getopt::Long; use Getopt::Long;
my ($host, $user, $pass, $port, $dbname, $file, $del); my ($host, $user, $pass, $port, $dbname, $file, $del, $motif);
GetOptions( "host=s", \$host, GetOptions( "host=s", \$host,
"user=s", \$user, "user=s", \$user,
...@@ -17,11 +17,17 @@ GetOptions( "host=s", \$host, ...@@ -17,11 +17,17 @@ GetOptions( "host=s", \$host,
"port=i", \$port, "port=i", \$port,
"dbname=s", \$dbname, "dbname=s", \$dbname,
"file=s", \$file, "file=s", \$file,
"motif=i", \$motif,
"delete", \$del, "delete", \$del,
"help", \&usage "help", \&usage
); );
if (!$motif) {
print "No motif ID specified, exiting\n";
exit(1);
}
my $dbi = DBI->connect("dbi:mysql:host=$host;port=$port;database=$dbname", my $dbi = DBI->connect("dbi:mysql:host=$host;port=$port;database=$dbname",
$user, $user,
$pass, $pass,
...@@ -109,7 +115,7 @@ while (<FILE>) { ...@@ -109,7 +115,7 @@ while (<FILE>) {
$chr_slice->end(), $chr_slice->end(),
$chr_slice->strand(), $chr_slice->strand(),
$analysis->dbID(), $analysis->dbID(),
0, $motif,
'negative'); 'negative');
my $rr_id = $rr_sth->{'mysql_insertid'}; my $rr_id = $rr_sth->{'mysql_insertid'};
...@@ -152,6 +158,7 @@ Usage: perl load_regulatory.pl ...@@ -152,6 +158,7 @@ Usage: perl load_regulatory.pl
-user : user name -user : user name
-pass : password -pass : password
-dbname : database name -dbname : database name
-motif : ID of motif to link to. Must already exist in database.
-file : file to load from -file : file to load from
-delete : delete existing contents of tables first -delete : delete existing contents of tables first
......
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