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
33171ae1
Commit
33171ae1
authored
17 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Remove the '-skipdownload' switch.
Also keep help text below 80 chars/line.
parent
c6ba88eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc-scripts/xref_mapping/XrefParser/BaseParser.pm
+11
-18
11 additions, 18 deletions
misc-scripts/xref_mapping/XrefParser/BaseParser.pm
misc-scripts/xref_mapping/xref_parser.pl
+48
-49
48 additions, 49 deletions
misc-scripts/xref_mapping/xref_parser.pl
with
59 additions
and
67 deletions
misc-scripts/xref_mapping/XrefParser/BaseParser.pm
+
11
−
18
View file @
33171ae1
...
...
@@ -32,13 +32,10 @@ my %dependent_sources;
my
%taxonomy2species_id
;
my
%name2species_id
;
my
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
$create
,
$release
,
$cleanup
,
$deletedownloaded
,
$skipdownload
,
$drop_db
,
$checkdownload
,
$dl_path
,
$unzip
);
my
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
$create
,
$release
,
$cleanup
,
$deletedownloaded
,
$drop_db
,
$checkdownload
,
$dl_path
,
$unzip
);
# --------------------------------------------------------------------------------
# Get info about files to be parsed from the database
...
...
@@ -46,12 +43,12 @@ my (
sub
run
{
my
$self
=
shift
;
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
my
$speciesr
,
my
$sourcesr
,
$skipdownload
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_db
,
$deletedownloaded
,
$dl_path
,
my
$notsourcesr
,
$unzip
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
my
$speciesr
,
my
$sourcesr
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_db
,
$deletedownloaded
,
$dl_path
,
my
$notsourcesr
,
$unzip
)
=
@_
;
$base_dir
=
$dl_path
if
$dl_path
;
...
...
@@ -248,11 +245,7 @@ sub run {
printf
(
"
Uncompressing '%s' using 'gunzip'
\n
",
$file
);
system
(
"
gunzip
",
"
-f
",
$file
);
}
if
(
$unzip
)
{
$file
=~
s/\.(gz|Z)$//
;
# If skipdownload set this will
# not have been done yet.
# If it has, no harm done
}
if
(
$unzip
)
{
$file
=~
s/\.(gz|Z)$//
}
# Compare checksums and parse/upload if necessary need to
# check file size as some .SPC files can be of zero length
...
...
This diff is collapsed.
Click to expand it.
misc-scripts/xref_mapping/xref_parser.pl
+
48
−
49
View file @
33171ae1
...
...
@@ -3,14 +3,12 @@ use strict;
use
Getopt::
Long
;
use
XrefParser::
BaseParser
;
my
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
@species
,
@sources
,
$skipdownload
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_existing_db
,
$deletedownloaded
,
$dl_path
,
@notsource
,
$unzip
);
my
(
$host
,
$port
,
$dbname
,
$user
,
$pass
,
@species
,
@sources
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_existing_db
,
$deletedownloaded
,
$dl_path
,
@notsource
,
$unzip
);
$unzip
=
0
;
# Do not decompress gzipped files by default
...
...
@@ -23,7 +21,6 @@ GetOptions(
'
species=s
'
=>
\
@species
,
'
source=s
'
=>
\
@sources
,
'
download_dir=s
'
=>
\
$dl_path
,
'
skipdownload
'
=>
\
$skipdownload
,
# Skips all downloads
'
checkdownload!
'
=>
\
$checkdownload
,
# Don't download if exists
'
create
'
=>
\
$create
,
'
setrelease=s
'
=>
\
$release
,
...
...
@@ -34,8 +31,7 @@ GetOptions(
'
delete_downloaded
'
=>
\
$deletedownloaded
,
'
download_path=s
'
=>
\
$dl_path
,
'
unzip
'
=>
\
$unzip
,
# Force decompression of files
'
help
'
=>
sub
{
usage
();
exit
(
0
);
}
);
'
help
'
=>
sub
{
usage
();
exit
(
0
);
}
);
@species
=
split
(
/,/
,
join
('
,
',
@species
));
@sources
=
split
(
/,/
,
join
('
,
',
@sources
));
...
...
@@ -50,16 +46,14 @@ if ( !$user || !$host || !$dbname ) {
my
$base_parser
=
XrefParser::
BaseParser
->
new
();
$base_parser
->
run
(
$host
,
(
defined
$port
?
$port
:
'
3306
'
),
$dbname
,
$user
,
$pass
,
\
@species
,
\
@sources
,
$skipdownload
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_existing_db
,
$deletedownloaded
,
$dl_path
,
\
@notsource
,
$unzip
);
$host
,
(
defined
$port
?
$port
:
'
3306
'
),
$dbname
,
$user
,
$pass
,
\
@species
,
\
@sources
,
$checkdownload
,
$create
,
$release
,
$cleanup
,
$drop_existing_db
,
$deletedownloaded
,
$dl_path
,
\
@notsource
,
$unzip
);
# --------------------------------------------------------------------------------
...
...
@@ -67,42 +61,45 @@ sub usage {
print
<<
"
EOF
";
xref_parser
.
pl
-
user
{
user
}
-
pass
{
password
}
-
host
{
host
}
-
port
{
port
}
-
dbname
{
database
}
-
species
{
species1
,
species2
}
-
source
{
source1
,
source2
}
-
notsource
{
source1
,
source2
}
-
skipdownload
-
create
-
setrelease
xref_parser
.
pl
-
user
{
user
}
-
pass
{
password
}
-
host
{
host
}
\\
-
port
{
port
}
-
dbname
{
database
}
-
species
{
species1
,
species2
}
\\
-
source
{
source1
,
source2
}
-
notsource
{
source1
,
source2
}
\\
-
create
-
setrelease
-
user
User
name
to
access
database
.
Must
allow
writing
.
-
pass
Password
for
user
.
-
host
Database
host
.
-
port
Database
port
.
-
dbname
Name
of
xref
database
to
use
/
create
.
-
species
Which
species
to
import
.
Multiple
-
species
arguments
and
/
or
comma
,
separated
lists
of
species
are
allowed
.
Species
may
be
referred
to
by
genus
/
species
(
e
.
g
.
homo_sapiens
)
or
common
aliases
(
e
.
g
.
human
)
.
Specifying
an
unknown
species
will
cause
a
list
of
valid
species
to
be
printed
.
Not
specifying
a
-
species
argument
will
result
in
all
species
being
-
species
Which
species
to
import
.
Multiple
-
species
arguments
and
/
or
comma
,
separated
lists
of
species
are
allowed
.
Species
may
be
referred
to
by
genus
/
species
(
e
.
g
.
homo_sapiens
)
or
common
aliases
(
e
.
g
.
human
)
.
Specifying
an
unknown
species
will
cause
a
list
of
valid
species
to
be
printed
.
Not
specifying
a
-
species
argument
will
result
in
all
species
being
used
.
-
source
Which
sources
to
import
.
Multiple
-
source
arguments
and
/
or
comma
,
separated
lists
of
sources
are
allowed
.
Specifying
an
unknown
source
will
cause
a
list
of
valid
sources
to
be
printed
.
Not
specifying
a
-
source
argument
will
result
in
all
species
being
-
source
Which
sources
to
import
.
Multiple
-
source
arguments
and
/
or
comma
,
separated
lists
of
sources
are
allowed
.
Specifying
an
unknown
source
will
cause
a
list
of
valid
sources
to
be
printed
.
Not
specifying
a
-
source
argument
will
result
in
all
species
being
used
.
-
notsource
Which
source
to
skip
.
-
create
If
specified
,
cause
dbname
to
be
deleted
and
re
-
created
if
it
already
exists
.
User
is
prompted
before
database
is
dropped
to
prevent
disasters
arising
from
dropping
the
wrong
database
.
-
skipdownload
Don
'
t download any data, parse existing.
-
create
If
specified
,
cause
dbname
to
be
deleted
and
re
-
created
if
it
already
exists
.
User
is
prompted
before
database
is
dropped
to
prevent
disasters
arising
from
dropping
the
wrong
database
.
-checkdownload Check if file exists, otherwise downloads the file
-
checkdownload
Check
if
file
exists
,
otherwise
downloads
the
file
.
-
deletedownloaded
Delete
any
existing
downloaded
files
first
.
...
...
@@ -110,11 +107,13 @@ sub usage {
-
cleanup
Delete
the
downloaded
source
files
after
parsing
.
-drop_db Drop the xref-database without user interaction
-
drop_db
Drop
the
xref
-
database
without
user
interaction
.
-download_path Directory into which to download files (default is the current directory)
-
download_path
Directory
into
which
to
download
files
(
default
is
the
current
directory
)
.
-unzip Decompress gzipped files (default is to use compressed files)
-
unzip
Decompress
gzipped
files
(
default
is
to
use
compressed
files
)
.
EOF
...
...
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