standaloneJob.html 6.02 KB
Newer Older
Matthieu Muffato's avatar
Matthieu Muffato committed
1 2 3 4 5 6
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>standaloneJob.pl</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
<link rev="made" href="mailto:root@localhost" />
Matthieu Muffato's avatar
Matthieu Muffato committed
8 9
</head>

10
<body>
Matthieu Muffato's avatar
Matthieu Muffato committed
11 12 13



14
<h1 id="NAME">NAME</h1>
Matthieu Muffato's avatar
Matthieu Muffato committed
15

16
<pre><code>    standaloneJob.pl</code></pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
17

18
<h1 id="DESCRIPTION">DESCRIPTION</h1>
Matthieu Muffato's avatar
Matthieu Muffato committed
19

20
<pre><code>    standaloneJob.pl is an eHive component script that
Matthieu Muffato's avatar
Matthieu Muffato committed
21 22 23 24
        1. takes in a RunnableDB module,
        2. creates a standalone job outside an eHive database by initializing parameters from command line arguments (ARRAY- and HASH- arguments can be passed+parsed too!)
        3. and runs that job outside the database.
        4. can optionally dataflow into tables fully defined by URLs
25 26 27 28 29 30 31
    Naturally, only certain RunnableDB modules can be run using this script, and some database-related functionality will be lost.</code></pre>

<h1 id="USAGE-EXAMPLES">USAGE EXAMPLES</h1>

<pre><code>        # Run a job with default parameters, specify module by its package name:
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::FailureTest

Matthieu Muffato's avatar
Matthieu Muffato committed
32
        # Run the same job with default parameters, but specify module by its relative filename:
33 34
    standaloneJob.pl RunnableDB/FailureTest.pm

Matthieu Muffato's avatar
Matthieu Muffato committed
35 36
        # Run a job and re-define some of the default parameters:
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::FailureTest -time_RUN=2 -time_WRITE_OUTPUT=3 -state=WRITE_OUTPUT -value=2
37 38 39 40 41 42
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::SystemCmd -cmd &#39;ls -l&#39;
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::SystemCmd -input_id &quot;{ &#39;cmd&#39; =&gt; &#39;ls -l&#39; }&quot;

        # Run a job and re-define its &#39;db_conn&#39; parameter to allow it to perform some database-related operations:
    standaloneJob.pl RunnableDB/SqlCmd.pm -db_conn mysql://ensadmin:xxxxxxx@127.0.0.1:2912/lg4_compara_families_63 -sql &#39;INSERT INTO meta (meta_key,meta_value) VALUES (&quot;hello&quot;, &quot;world2&quot;)&#39;

Matthieu Muffato's avatar
Matthieu Muffato committed
43
        # Run a job with given parameters, but skip the write_output() step:
44 45
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::FailureTest -no_write -time_RUN=2 -time_WRITE_OUTPUT=3 -state=WRITE_OUTPUT -value=2

Matthieu Muffato's avatar
Matthieu Muffato committed
46
        # Run a job and re-direct its dataflow into tables:
47 48 49
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::JobFactory -inputfile foo.txt -delimiter &#39;\t&#39; -column_names &quot;[ &#39;name&#39;, &#39;age&#39; ]&quot; \
                        -flow_into &quot;{ 2 =&gt; [&#39;mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/foo&#39;, &#39;mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/bar&#39;] }&quot;

Matthieu Muffato's avatar
Matthieu Muffato committed
50
        # Run a Compara job that needs a connection to Compara database:
51 52 53 54
    standaloneJob.pl Bio::EnsEMBL::Compara::RunnableDB::ObjectFactory -compara_db &#39;mysql://ensadmin:xxxxxxx@127.0.0.1:2911/sf5_ensembl_compara_master&#39; \
                        -adaptor_name MethodLinkSpeciesSetAdaptor -adaptor_method fetch_all_by_method_link_type -method_param_list &quot;[ &#39;ENSEMBL_ORTHOLOGUES&#39; ]&quot; \
                        -column_names2getters &quot;{ &#39;name&#39; =&gt; &#39;name&#39;, &#39;mlss_id&#39; =&gt; &#39;dbID&#39; }&quot; -flow_into &quot;{ 2 =&gt; &#39;mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/baz&#39; }&quot;

Matthieu Muffato's avatar
Matthieu Muffato committed
55 56
        # Create a new job in a database using automatic dataflow from a database-less Dummy job:
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::Dummy -a_multiplier 1234567 -b_multiplier 9876543 \
57 58 59 60 61 62 63 64 65
                        -flow_into &quot;{ 1 =&gt; &#39;mysql://ensadmin:xxxxxxx@127.0.0.1/lg4_long_mult/analysis?logic_name=start&#39; }&quot;

        # Produce a semaphore group of jobs from a database-less DigitFactory job:
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::LongMult::DigitFactory -input_id &quot;{ &#39;a_multiplier&#39; =&gt; &#39;2222222222&#39;, &#39;b_multiplier&#39; =&gt; &#39;3434343434&#39;}&quot; \
        -flow_into &quot;{ &#39;2-&gt;A&#39; =&gt; &#39;mysql://ensadmin:${ENSADMIN_PSW}@127.0.0.1/lg4_long_mult/analysis?logic_name=part_multiply&#39;, &#39;A-&gt;1&#39; =&gt; &#39;mysql://ensadmin:${ENSADMIN_PSW}@127.0.0.1/lg4_long_mult/analysis?logic_name=add_together&#39; }&quot; </code></pre>

<h1 id="SCRIPT-SPECIFIC-OPTIONS">SCRIPT-SPECIFIC OPTIONS</h1>

<pre><code>    -help               : print this help
Matthieu Muffato's avatar
Matthieu Muffato committed
66 67 68 69
    -debug &lt;level&gt;      : turn on debug messages at &lt;level&gt;
    -no_write           : skip the execution of write_output() step this time
    -reg_conf &lt;path&gt;    : load registry entries from the given file (these entries may be needed by the RunnableDB itself)
    -input_id &quot;&lt;hash&gt;&quot;  : specify the whole input_id parameter in one stringified hash
70 71 72 73 74 75
    -flow_out &quot;&lt;hash&gt;&quot;  : defines the dataflow re-direction rules in a format similar to PipeConfig&#39;s - see the last example

    NB: all other options will be passed to the runnable (leading dashes removed) and will constitute the parameters for the job.</code></pre>

<h1 id="LICENSE">LICENSE</h1>

76
<pre><code>    Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
nwillhoft's avatar
nwillhoft committed
77
    Copyright [2016-2021] EMBL-European Bioinformatics Institute
78

Matthieu Muffato's avatar
Matthieu Muffato committed
79
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.
80 81 82 83
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

Matthieu Muffato's avatar
Matthieu Muffato committed
84 85
    Unless required by applicable law or agreed to in writing, software distributed under the License
    is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
86 87 88 89 90 91
    See the License for the specific language governing permissions and limitations under the License.</code></pre>

<h1 id="CONTACT">CONTACT</h1>

<pre><code>    Please subscribe to the Hive mailing list:  http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users  to discuss Hive-related questions or to be notified of our updates</code></pre>

Matthieu Muffato's avatar
Matthieu Muffato committed
92 93 94 95

</body>

</html>
96 97