Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-hive
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl-hive
Commits
8cf385f6
Commit
8cf385f6
authored
15 years ago
by
Leo Gordon
Browse files
Options
Downloads
Patches
Plain Diff
now with the option to run non-script analyses
parent
b44b5e3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/cmd_hive.pl
+19
-9
19 additions, 9 deletions
scripts/cmd_hive.pl
with
19 additions
and
9 deletions
scripts/cmd_hive.pl
+
19
−
9
View file @
8cf385f6
#!/usr/local/bin/perl -w
# cmd_hive.pl
#
# Cared for by Albert Vilella <>
...
...
@@ -78,7 +79,9 @@ $self->{'db_conf'}->{'-user'} = 'ensro';
$self
->
{'
db_conf
'}
->
{'
-port
'}
=
3306
;
$self
->
{'
analysis_id
'}
=
undef
;
$self
->
{'
logic_name
'}
=
undef
;
$self
->
{'
logic_name
'}
=
'
cmd_hive_analysis
';
$self
->
{'
module
'}
=
'
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd
';
$self
->
{'
parameters
'}
=
'
{}
';
$self
->
{'
outdir
'}
=
undef
;
$self
->
{'
beekeeper
'}
=
undef
;
$self
->
{'
process_id
'}
=
undef
;
...
...
@@ -96,13 +99,15 @@ GetOptions('help' => \$help,
'
dbname=s
'
=>
\
$dbname
,
'
analysis_id=i
'
=>
\
$self
->
{'
analysis_id
'},
'
logic_name=s
'
=>
\
$self
->
{'
logic_name
'},
'
module=s
'
=>
\
$self
->
{'
module
'},
'
limit=i
'
=>
\
$self
->
{'
job_limit
'},
'
lifespan=i
'
=>
\
$self
->
{'
lifespan
'},
'
outdir=s
'
=>
\
$self
->
{'
outdir
'},
'
bk=s
'
=>
\
$self
->
{'
beekeeper
'},
'
pid=s
'
=>
\
$self
->
{'
process_id
'},
'
input_id=s
'
=>
\
$self
->
{'
input_id
'},
'
inputfile=s
'
=>
\
$self
->
{'
inputfile
'},
'
parameters=s
'
=>
\
$self
->
{'
parameters
'},
'
inputfile=s
'
=>
\
$self
->
{'
inputfile
'},
'
suffix_a=s
'
=>
\
$self
->
{'
suffix_a
'},
'
suffix_b=s
'
=>
\
$self
->
{'
suffix_b
'},
'
hashed_a=s
'
=>
\
$self
->
{'
hashed_a
'},
...
...
@@ -156,27 +161,30 @@ sub usage {
print
"
cmd_hive.pl [options]
\n
";
print
"
-help : print this help
\n
";
print
"
-url <url string> : url defining where hive database is located
\n
";
print
"
-input_id <cmd string> : command to be executed
\n
";
print
"
-input_id <cmd string> : command to be executed
(or param. hash to be passed to analysis module)
\n
";
print
"
-suffix_a <tag> : suffix from here
\n
";
print
"
-suffix_b <tag> : suffix to here
\n
";
print
"
-suffix_bn <tag> : end for suffix in multiple levels
\n
";
print
"
-tag <tag> : fixed tag in the command line
\n
";
print
"
cmd_hive.pl v1.0
\n
";
print
"
-logic_name <analysis name> : logic_name of the analysis
\n
";
print
"
-module <module name> : name of the module to be run
\n
";
exit
(
1
);
}
sub
job_creation
{
my
$self
=
shift
;
my
$logic_name
=
$self
->
{'
logic_name
'}
||
"
cmd_hive_analysis
";
print
("
creating analysis '
$logic_name
'
\n
");
my
$logic_name
=
$self
->
{'
logic_name
'};
my
$module
=
$self
->
{'
module
'};
my
$parameters
=
$self
->
{'
parameters
'};
print
("
creating analysis '
$logic_name
' to be computed using module '
$module
' with parameters '
$parameters
'
\n
");
$self
->
{
_analysis
}
=
Bio::EnsEMBL::
Analysis
->
new
(
-
db
=>
'',
-
db_file
=>
'',
-
db_version
=>
'
1
',
-
parameters
=>
""
,
-
parameters
=>
$parameters
,
-
logic_name
=>
$logic_name
,
-
module
=>
'
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd
'
,
-
module
=>
$module
,
);
$DBA
->
get_AnalysisAdaptor
()
->
store
(
$self
->
{
_analysis
});
...
...
@@ -217,7 +225,9 @@ sub job_creation {
$self
->
{
resolved_input_id
}
=~
s/\$suffix/$suffix/g
;
$self
->
{
resolved_input_id
}
=~
s/\$tag/$tag/g
;
print
"",
$self
->
{
resolved_input_id
},
"
at
",(
time
()
-
$starttime
),"
secs
\n
";
# if(++$count % 50 == 0);
if
(
++
$count
%
100
==
0
)
{
print
"",
$self
->
{
resolved_input_id
},
"
at
",(
time
()
-
$starttime
),"
secs
\n
";
}
$self
->
create_resolved_input_id_job
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment