Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
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
Commits
1cc6bbf7
Commit
1cc6bbf7
authored
18 years ago
by
Patrick Meidl
Browse files
Options
Downloads
Patches
Plain Diff
lsf wrapper for align_nonident_regions.pl
parent
422be3cf
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
misc-scripts/assembly/align_nonident_regions_wrapper.pl
+179
-0
179 additions, 0 deletions
misc-scripts/assembly/align_nonident_regions_wrapper.pl
with
179 additions
and
0 deletions
misc-scripts/assembly/align_nonident_regions_wrapper.pl
0 → 100755
+
179
−
0
View file @
1cc6bbf7
#!/usr/local/bin/perl
=head1 NAME
align_nonident_regions_wrapper.pl - lsf wrapper for align_nonident_regions.pl
=head1 SYNOPSIS
align_nonident_regions_wrapper.pl [arguments]
Required arguments:
--dbname, db_name=NAME database name NAME
--host, --dbhost, --db_host=HOST database host HOST
--port, --dbport, --db_port=PORT database port PORT
--user, --dbuser, --db_user=USER database username USER
--pass, --dbpass, --db_pass=PASS database passwort PASS
--assembly=ASSEMBLY assembly version ASSEMBLY
--altdbname=NAME alternative database NAME
--altassembly=ASSEMBLY alternative assembly version ASSEMBLY
Optional arguments:
--chromosomes, --chr=LIST only process LIST chromosomes
--bindir=DIR look for program binaries in DIR
--tmpfir=DIR use DIR for temporary files (useful for
re-runs after failure)
--conffile, --conf=FILE read parameters from FILE
(default: conf/Conversion.ini)
--logfile, --log=FILE log to FILE (default: *STDOUT)
--logpath=PATH write logfile to PATH (default: .)
--logappend, --log_append append to logfile (default: truncate)
-v, --verbose=0|1 verbose logging (default: false)
-i, --interactive=0|1 run script interactively (default: true)
-n, --dry_run, --dry=0|1 don't write results to database
-h, --help, -? print help (this message)
=head1 DESCRIPTION
This script is a wrapper around align_nonident_regions.pl to run one chromosome
at a time via lsf. See documentation in align_nonident_regions.pl for details.
=head1 RELATED FILES
The whole process of creating a whole genome alignment between two assemblies
is done by a series of scripts. Please see
ensembl/misc-scripts/assembly/README
for a high-level description of this process, and POD in the individual scripts
for the details.
=head1 LICENCE
This code is distributed under an Apache style licence:
Please see http://www.ensembl.org/code_licence.html for details
=head1 AUTHOR
Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team
=head1 CONTACT
Please post comments/questions to the Ensembl development list
<ensembl-dev@ebi.ac.uk>
=cut
use
strict
;
use
warnings
;
no
warnings
'
uninitialized
';
use
FindBin
qw($Bin)
;
use
vars
qw($SERVERROOT)
;
BEGIN
{
$SERVERROOT
=
"
$Bin
/../../..
";
unshift
(
@INC
,
"
.
");
unshift
(
@INC
,
"
$SERVERROOT
/ensembl/modules
");
unshift
(
@INC
,
"
$SERVERROOT
/bioperl-live
");
}
use
Getopt::
Long
;
use
Pod::
Usage
;
use
Bio::EnsEMBL::Utils::
ConversionSupport
;
use
AssemblyMapper::
BlastzAligner
;
$|
=
1
;
my
$support
=
new
Bio::EnsEMBL::Utils::
ConversionSupport
(
$SERVERROOT
);
# parse options
$support
->
parse_common_options
(
@
_
);
$support
->
parse_extra_options
(
'
assembly=s
',
'
altdbname=s
',
'
altassembly=s
',
'
bindir=s
',
'
tmpdir=s
',
'
chromosomes|chr=s@
',
);
$support
->
allowed_params
(
$support
->
get_common_params
,
'
assembly
',
'
altdbname
',
'
altassembly
',
'
bindir
',
'
tmpdir
',
'
chromosomes
',
);
if
(
$support
->
param
('
help
')
or
$support
->
error
)
{
warn
$support
->
error
if
$support
->
error
;
pod2usage
(
1
);
}
$support
->
comma_to_list
('
chromosomes
');
# ask user to confirm parameters to proceed
$support
->
confirm_params
;
# get log filehandle and print heading and parameters to logfile
$support
->
init_log
;
$support
->
check_required_params
(
'
assembly
',
'
altdbname
',
'
altassembly
'
);
#####
# connect to database and get adaptors
#
my
$R_dba
=
$support
->
get_database
('
ensembl
');
# loop over chromosomes
$support
->
log_stamped
("
Looping over chromosomes...
\n
");
foreach
my
$chr
(
$support
->
sort_chromosomes
)
{
$support
->
log_stamped
("
Chromosome
$chr
...
\n
",
1
);
# run align_nonident_regions.pl via lsf
my
$options
=
$support
->
create_commandline_options
({
'
allowed_params
'
=>
1
,
'
replace
'
=>
{
logfile
=>
"
align_nonident_regions.chr.
$chr
.log
",
chromosomes
=>
$chr
,
interactive
=>
0
,
},
});
$support
->
log
("
Running align_nonident_regions.pl via lsf...
\n
",
2
);
my
$logpath
=
$support
->
param
('
logpath
')
.
'
/lsf
';
unless
(
-
d
$logpath
)
{
system
("
mkdir
$logpath
")
==
0
or
$support
->
log_error
("
Can't create lsf log dir
$logpath
: $!
\n
");
}
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
)
;
system
("
$cmd
")
==
0
or
$support
->
log_error
("
Error running align_nonident_regions.pl: $!
");
$support
->
log_stamped
("
Done.
\n
",
2
);
$support
->
log_stamped
("
Done with chromosome
$chr
.
\n
",
1
);
}
$support
->
log_stamped
("
Done.
\n
");
# finish logfile
$support
->
finish_log
;
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