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
d8ad6971
Commit
d8ad6971
authored
20 years ago
by
Steve Trevanion
Browse files
Options
Downloads
Patches
Plain Diff
conversion script for vega 19 -> 20
parent
c6934d05
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc-scripts/surgery/SeqStoreConverter/VegaBasicConverter.pm
+1172
-0
1172 additions, 0 deletions
misc-scripts/surgery/SeqStoreConverter/VegaBasicConverter.pm
misc-scripts/surgery/vega_convert_seqstore.pl
+125
-0
125 additions, 0 deletions
misc-scripts/surgery/vega_convert_seqstore.pl
with
1297 additions
and
0 deletions
misc-scripts/surgery/SeqStoreConverter/VegaBasicConverter.pm
0 → 100644
+
1172
−
0
View file @
d8ad6971
This diff is collapsed.
Click to expand it.
misc-scripts/surgery/vega_convert_seqstore.pl
0 → 100644
+
125
−
0
View file @
d8ad6971
use
strict
;
use
warnings
;
use
Getopt::
Long
;
use
Cwd
;
use
vars
qw(@INC)
;
#effectively add this directory to the PERL5LIB automatically
my
$dir
=
cwd
()
.
'
/
'
.
__FILE__
;
my
@d
=
split
(
/\//
,
$dir
);
pop
(
@d
);
$dir
=
join
('
/
',
@d
);
unshift
@INC
,
$dir
;
my
(
$file
,
$user
,
$password
,
$verbose
,
$force
,
$help
,
$schema
,
$limit
);
GetOptions
('
file=s
'
=>
\
$file
,
'
schema=s
'
=>
\
$schema
,
'
user=s
'
=>
\
$user
,
'
password=s
'
=>
\
$password
,
'
verbose
'
=>
\
$verbose
,
'
force
'
=>
\
$force
,
'
limit=s
'
=>
\
$limit
,
'
help
'
=>
sub
{
&show_help
();
exit
1
;}
);
usage
("
-file option is required
")
if
(
!
$file
);
usage
("
-schema option is required
")
if
(
!
$schema
);
usage
()
if
(
$help
);
open
(
FILE
,
$file
)
or
die
("
Could not open input file '
$file
'
");
my
@all_species_converters
;
while
(
my
$line
=
<
FILE
>
)
{
chomp
(
$line
);
next
if
$line
=~
/^#/
;
next
if
!
$line
;
my
(
$species
,
$host
,
$source_db_name
,
$target_db_name
)
=
split
(
"
\t
",
$line
);
my
$converter
;
eval
"
require SeqStoreConverter::
$species
";
if
(
$@
)
{
warn
("
Could not require conversion module SeqStoreConverter::
$species
\n
"
.
"
Using SeqStoreConverter::VegaBasicConverter instead:
\n
$@
");
require
SeqStoreConverter::
VegaBasicConverter
;
$species
=
"
VegaBasicConverter
";
}
{
no
strict
'
refs
';
$converter
=
"
SeqStoreConverter::
$species
"
->
new
(
$user
,
$password
,
$host
,
$source_db_name
,
$target_db_name
,
$schema
,
$force
,
$verbose
,
$limit
);
}
push
@all_species_converters
,
$converter
;
}
for
my
$converter
(
@all_species_converters
)
{
$converter
->
debug
(
"
\n\n
*** converting
"
.
$converter
->
source
.
"
to
"
.
$converter
->
target
()
.
"
***
");
$converter
->
transfer_meta
();
$converter
->
create_coord_systems
();
$converter
->
create_seq_regions
();
$converter
->
create_assembly
();
$converter
->
create_attribs
();
$converter
->
set_top_level
();
$converter
->
transfer_dna
();
$converter
->
transfer_genes
();
$converter
->
transfer_prediction_transcripts
();
$converter
->
transfer_features
();
$converter
->
transfer_stable_ids
();
$converter
->
copy_other_tables
();
$converter
->
copy_repeat_consensus
();
}
print
STDERR
"
*** All finished ***
\n
";
sub
usage
{
my
$msg
=
shift
;
print
STDERR
"
$msg
\n\n
"
if
(
$msg
);
print
STDERR
<<EOF;
usage: perl convert_seqstore <options>
options: -file <input_file> input file with tab delimited 'species',
'host', 'source_db', 'target_db' values
on each line
-schema <table_file> file containing SQL schema definition
-user <user> a mysql db user with read/write priveleges
-password <password> the mysql user's password
-verbose print out debug statements
-force replace any target dbs that already exists
-limit <num_rows> limit the number of features transfered to
speed up testing
-help display this message
example: perl convert_seqstore.pl -file converter.input \\
-schema ../../sql/table.sql -user ensadmin -password secret \\
-force -verbose
EOF
#'
exit
;
}
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