standaloneJob.html 6.01 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:_mdnsresponder@scream.apple.com" />
Matthieu Muffato's avatar
Matthieu Muffato committed
8 9 10 11 12
</head>

<body style="background-color: white">


13 14 15 16
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<!--
Matthieu Muffato's avatar
Matthieu Muffato committed
17

18
<ul>
Matthieu Muffato's avatar
Matthieu Muffato committed
19

20 21 22 23 24 25 26
	<li><a href="#name">NAME</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#usage_examples">USAGE EXAMPLES</a></li>
	<li><a href="#script_specific_options">SCRIPT-SPECIFIC OPTIONS</a></li>
	<li><a href="#license">LICENSE</a></li>
	<li><a href="#contact">CONTACT</a></li>
</ul>
Matthieu Muffato's avatar
Matthieu Muffato committed
27

28
-->
Matthieu Muffato's avatar
Matthieu Muffato committed
29

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

</div>
<!-- INDEX END -->

<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<pre>
    standaloneJob.pl</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<pre>
    standaloneJob.pl is an eHive component script that
Matthieu Muffato's avatar
Matthieu Muffato committed
46 47 48 49
        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
50 51 52 53 54 55 56 57 58
    Naturally, only certain RunnableDB modules can be run using this script, and some database-related functionality will be lost.</pre>
<p>
</p>
<hr />
<h1><a name="usage_examples">USAGE EXAMPLES</a></h1>
<pre>
        # Run a job with default parameters, specify module by its package name:
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::FailureTest</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
59
        # Run the same job with default parameters, but specify module by its relative filename:
60 61
    standaloneJob.pl RunnableDB/FailureTest.pm</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
62 63
        # 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
64 65 66 67 68 69
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::SystemCmd -cmd 'ls -l'
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::SystemCmd -input_id &quot;{ 'cmd' =&gt; 'ls -l' }&quot;</pre>
<pre>
        # Run a job and re-define its 'db_conn' 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 'INSERT INTO meta (meta_key,meta_value) VALUES (&quot;hello&quot;, &quot;world2&quot;)'</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
70
        # Run a job with given parameters, but skip the write_output() step:
71 72
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::FailureTest -no_write -time_RUN=2 -time_WRITE_OUTPUT=3 -state=WRITE_OUTPUT -value=2</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
73
        # Run a job and re-direct its dataflow into tables:
74 75 76
    standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::JobFactory -inputfile foo.txt -delimiter '\t' -column_names &quot;[ 'name', 'age' ]&quot; \
                        -flow_into &quot;{ 2 =&gt; ['mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/foo', 'mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/bar'] }&quot;</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
77
        # Run a Compara job that needs a connection to Compara database:
78 79 80 81
    standaloneJob.pl Bio::EnsEMBL::Compara::RunnableDB::ObjectFactory -compara_db 'mysql://ensadmin:xxxxxxx@127.0.0.1:2911/sf5_ensembl_compara_master' \
                        -adaptor_name MethodLinkSpeciesSetAdaptor -adaptor_method fetch_all_by_method_link_type -method_param_list &quot;[ 'ENSEMBL_ORTHOLOGUES' ]&quot; \
                        -column_names2getters &quot;{ 'name' =&gt; 'name', 'mlss_id' =&gt; 'dbID' }&quot; -flow_into &quot;{ 2 =&gt; 'mysql://ensadmin:xxxxxxx@127.0.0.1:2914/lg4_triggers/baz' }&quot;</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
82 83
        # 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 \
84 85 86 87 88 89 90
                        -flow_into &quot;{ 1 =&gt; 'mysql://ensadmin:xxxxxxx@127.0.0.1/lg4_long_mult/analysis?logic_name=start' }&quot;</pre>
<p>
</p>
<hr />
<h1><a name="script_specific_options">SCRIPT-SPECIFIC OPTIONS</a></h1>
<pre>
    -help               : print this help
Matthieu Muffato's avatar
Matthieu Muffato committed
91 92 93 94
    -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
95 96 97 98 99 100 101 102 103 104
    -flow_out &quot;&lt;hash&gt;&quot;  : defines the dataflow re-direction rules in a format similar to PipeConfig's - see the last example</pre>
<pre>
    NB: all other options will be passed to the runnable (leading dashes removed) and will constitute the parameters for the job.</pre>
<p>
</p>
<hr />
<h1><a name="license">LICENSE</a></h1>
<pre>
    Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute</pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
105
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.
106 107 108 109
    You may obtain a copy of the License at</pre>
<pre>
         <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></pre>
<pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
110 111
    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.
112 113 114 115 116 117 118
    See the License for the specific language governing permissions and limitations under the License.</pre>
<p>
</p>
<hr />
<h1><a name="contact">CONTACT</a></h1>
<pre>
    Please subscribe to the Hive mailing list:  <a href="http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users">http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users</a>  to discuss Hive-related questions or to be notified of our updates</pre>
Matthieu Muffato's avatar
Matthieu Muffato committed
119 120 121 122

</body>

</html>