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
1d06c3ed
Commit
1d06c3ed
authored
18 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
SGD stuff for yeast added
parent
c1325273
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/SGDParser.pm
+77
-0
77 additions, 0 deletions
misc-scripts/xref_mapping/XrefParser/SGDParser.pm
misc-scripts/xref_mapping/sql/populate_metadata.sql
+9
-4
9 additions, 4 deletions
misc-scripts/xref_mapping/sql/populate_metadata.sql
with
86 additions
and
4 deletions
misc-scripts/xref_mapping/XrefParser/SGDParser.pm
0 → 100644
+
77
−
0
View file @
1d06c3ed
package
XrefParser::
SGDParser
;
use
strict
;
use
POSIX
qw(strftime)
;
use
File::
Basename
;
use
XrefParser::
BaseParser
;
use
vars
qw(@ISA)
;
@ISA
=
qw(XrefParser::BaseParser)
;
# --------------------------------------------------------------------------------
# Parse command line and run if being run directly
if
(
!
defined
(
caller
()))
{
if
(
scalar
(
@ARGV
)
!=
1
)
{
print
"
\n
Usage: SGDParser.pm file <source_id> <species_id>
\n\n
";
exit
(
1
);
}
run
(
$ARGV
[
0
]);
}
sub
run
{
my
$self
=
shift
if
(
defined
(
caller
(
1
)));
my
$file
=
shift
;
my
$source_id
=
shift
;
my
$species_id
=
shift
;
if
(
!
defined
(
$source_id
)){
$source_id
=
XrefParser::
BaseParser
->
get_source_id_for_filename
(
$file
);
}
if
(
!
defined
(
$species_id
)){
$species_id
=
XrefParser::
BaseParser
->
get_species_id_for_filename
(
$file
);
}
if
(
!
open
(
SGD
,"
<
"
.
$file
)){
print
"
ERROR: Could not open
$file
\n
";
return
1
;
# 1 is an error
}
my
$xref_count
=
0
;
my
$syn_count
=
0
;
while
(
<
SGD
>
)
{
chomp
;
my
(
$locus_name
,
$alias_name
,
$desc
,
$gene_prod
,
$phenotype
,
$orf_name
,
$sgd_id
)
=
split
(
/\t/
,
$_
);
my
(
@syn
)
=
split
(
/\|/
,
$alias_name
);
$self
->
add_xref
(
$sgd_id
,"",
$locus_name
,
$desc
,
$source_id
,
$species_id
);
$xref_count
++
;
foreach
my
$synonym
(
@syn
){
$self
->
add_to_syn
(
$sgd_id
,
$source_id
,
$synonym
);
$syn_count
++
;
}
}
print
$xref_count
.
"
SGD Xrefs added with
$syn_count
synonyms
\n
";
return
0
;
#successful
}
sub
new
{
my
$self
=
{};
bless
$self
,
"
XrefParser::SGDParser
";
return
$self
;
}
1
;
This diff is collapsed.
Click to expand it.
misc-scripts/xref_mapping/sql/populate_metadata.sql
+
9
−
4
View file @
1d06c3ed
...
...
@@ -51,6 +51,8 @@ INSERT INTO species (species_id, taxonomy_id, name, aliases) VALUES (8090, 8090,
INSERT
INTO
source
VALUES
(
1020
,
'MIM'
,
1
,
'Y'
,
10
,
1
,
""
);
INSERT
INTO
source
VALUES
(
2000
,
'CCDS'
,
1
,
'Y'
,
10
,
1
,
""
);
INSERT
INTO
source
VALUES
(
1110
,
'EntrezGene'
,
1
,
'Y'
,
10
,
1
,
""
);
INSERT
INTO
source
VALUES
(
1250
,
'SGD'
,
1
,
'Y'
,
10
,
1
,
""
);
INSERT
INTO
source
VALUES
(
1
,
"Uniprot/SWISSPROT"
,
1
,
'Y'
,
20
,
1
,
""
);
...
...
@@ -96,9 +98,6 @@ INSERT INTO source VALUES (1200, 'RGD', 1, 'Y',30, 1, "");
INSERT
INTO
source
VALUES
(
1300
,
'Interpro'
,
1
,
'Y'
,
30
,
1
,
""
);
INSERT
INTO
source
VALUES
(
1400
,
'ZFIN_ID'
,
1
,
'Y'
,
30
,
1
,
""
);
INSERT
INTO
source
VALUES
(
1250
,
'SGD'
,
1
,
'N'
,
30
,
1
,
""
);
#
INSERT
INTO
source
VALUES
(
2400
,
'WormBase'
,
1
,
'Y'
,
50
,
1
,
""
);
INSERT
INTO
source
VALUES
(
2400
,
'wormpep_id'
,
1
,
'Y'
,
50
,
1
,
""
);
INSERT
INTO
source
VALUES
(
2410
,
'wormbase_gene'
,
1
,
'N'
,
50
,
1
,
""
);
...
...
@@ -169,6 +168,7 @@ INSERT INTO source VALUES (5010, 'Illumina', 1, 'Y', 50, 1, "");
#
Codelink
INSERT
INTO
source
VALUES
(
5020
,
'Codelink'
,
1
,
'Y'
,
50
,
1
,
""
);
################################################################################
#
Files
to
fetch
data
from
...
...
@@ -1284,10 +1284,15 @@ INSERT INTO source_url (source_id, species_id, url, file_modified_date, upload_d
#
-----------------------------------------------------------------------------------
####
Yeast
##
E
m
trezGene
##
E
n
trezGene
INSERT
INTO
source_url
(
source_id
,
species_id
,
url
,
file_modified_date
,
upload_date
,
parser
)
\
VALUES
(
1110
,
4932
,
'ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_info.gz'
,
now
(),
now
(),
"EntrezGeneParser"
);
INSERT
INTO
source_url
(
source_id
,
species_id
,
url
,
file_modified_date
,
upload_date
,
parser
)
\
VALUES
(
1250
,
4932
,
'ftp://genome-ftp.stanford.edu/pub/yeast/gene_registry/registry.genenames.tab'
,
now
(),
now
(),
"SGDParser"
);
##
Uniprot
INSERT
INTO
source_url
(
source_id
,
species_id
,
url
,
file_modified_date
,
upload_date
,
parser
)
VALUES
\
(
1
,
4932
,
'ftp://ftp.ebi.ac.uk/pub/databases/uniprot/knowledgebase/uniprot_sprot.dat.gz'
,
now
(),
now
(),
"UniProtParser"
);
...
...
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