2 # See the NOTICE file distributed with this work for additional information
3 # regarding copyright ownership.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
20 align_nonident_regions_wrapper.pl - lsf wrapper
for align_nonident_regions.pl
24 align_nonident_regions_wrapper.pl [arguments]
28 --dbname, db_name=NAME database name NAME
29 --host, --dbhost, --db_host=HOST database host HOST
30 --port, --dbport, --db_port=PORT database port PORT
31 --user, --dbuser, --db_user=USER database username USER
32 --pass, --dbpass, --db_pass=PASS database passwort PASS
33 --assembly=ASSEMBLY assembly version ASSEMBLY
35 --altdbname=NAME alternative database NAME
36 --altassembly=ASSEMBLY alternative assembly version ASSEMBLY
40 --chromosomes, --chr=LIST only process LIST toplevel seq_regions
41 --bindir=DIR look
for program binaries in DIR
42 --tmpfir=DIR use DIR
for temporary files (useful
for
43 re-runs after failure)
45 --conffile, --conf=FILE read parameters from FILE
46 (
default: conf/Conversion.ini)
48 --logfile, --log=FILE log to FILE (
default: *STDOUT)
49 --logpath=PATH write logfile to PATH (
default: .)
50 --logappend, --log_append append to logfile (
default: truncate)
52 -v, --verbose=0|1 verbose logging (
default:
false)
53 -i, --interactive=0|1
run script interactively (
default:
true)
54 -n, --dry_run, --dry=0|1 don
't write results to database
55 -h, --help, -? print help (this message)
59 This script is a wrapper around align_nonident_regions.pl to run one toplevel seq_region
60 at a time via lsf. See documentation in align_nonident_regions.pl for details.
64 The whole process of creating a whole genome alignment between two assemblies
65 is done by a series of scripts. Please see
67 ensembl/misc-scripts/assembly/README
69 for a high-level description of this process, and POD in the individual scripts
75 Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team
79 Please post comments/questions to the Ensembl development list
80 <http://lists.ensembl.org/mailman/listinfo/dev>
86 no warnings 'uninitialized
';
89 use vars qw($SERVERROOT);
92 $SERVERROOT = "$Bin/../../..";
94 unshift(@INC, "$SERVERROOT/ensembl/modules");
95 unshift(@INC, "$SERVERROOT/bioperl-live");
100 use Bio::EnsEMBL::Utils::ConversionSupport;
101 use AssemblyMapper::BlastzAligner;
105 my $support = new Bio::EnsEMBL::Utils::ConversionSupport($SERVERROOT);
108 $support->parse_common_options(@_);
109 $support->parse_extra_options(
119 'chromosomes|chr=s@
',
121 $support->allowed_params(
122 $support->get_common_params,
135 if ($support->param('help
') or $support->error) {
136 warn $support->error if $support->error;
140 $support->comma_to_list('chromosomes
');
142 # ask user to confirm parameters to proceed
143 $support->confirm_params;
145 # get log filehandle and print heading and parameters to logfile
148 $support->check_required_params(
155 # connect to database and get adaptors
157 my $R_dba = $support->get_database('ensembl
');
159 # loop over toplevel seq_regions
160 $support->log_stamped("Looping over toplevel seq_regions...\n");
162 foreach my $chr ($support->sort_chromosomes($support->get_chrlength)) {
164 $support->log_stamped("Toplevel seq_region $chr...\n", 1);
166 # run align_nonident_regions.pl via lsf
167 my $options = $support->create_commandline_options({
168 'allowed_params
' => 1,
170 logfile => "align_nonident_regions.chr.$chr.log",
175 $support->log("Running align_nonident_regions.pl via lsf...\n", 2);
177 my $logpath = $support->param('logpath
').'/lsf
';
178 unless (-d $logpath) {
179 system("mkdir $logpath") == 0 or
180 $support->log_error("Can't create lsf log dir $logpath: $!\n
");
183 my $cmd = qq(bsub -o $logpath/align_nonident_regions.$chr.%J.out -e $logpath/align_nonident_regions.$chr.%J.err ./align_nonident_regions.pl $options
187 or $support->log_error("Error running align_nonident_regions.pl: $!i\n
");
189 $support->log_stamped("Done.\n
", 2);
191 $support->log_stamped("Done with toplevel seq_region $chr.\n
", 1);
194 $support->log_stamped("Done.\n
");
197 $support->finish_log;