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
8296ce89
Commit
8296ce89
authored
7 years ago
by
Magali Ruffier
Browse files
Options
Downloads
Patches
Plain Diff
simplify source parsing
parent
bde83ea1
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/MGI_CCDS_Parser.pm
+10
-17
10 additions, 17 deletions
misc-scripts/xref_mapping/XrefParser/MGI_CCDS_Parser.pm
misc-scripts/xref_mapping/xref_config.ini
+2
-2
2 additions, 2 deletions
misc-scripts/xref_mapping/xref_config.ini
with
12 additions
and
19 deletions
misc-scripts/xref_mapping/XrefParser/MGI_CCDS_Parser.pm
+
10
−
17
View file @
8296ce89
...
...
@@ -27,27 +27,22 @@ use DBI;
use
base
qw( XrefParser::BaseParser )
;
sub
run
_script
{
sub
run
{
my
(
$self
,
$ref_arg
)
=
@_
;
my
$source_id
=
$ref_arg
->
{
source_id
};
my
$species_id
=
$ref_arg
->
{
species_id
};
my
$file
=
$ref_arg
->
{
file
};
my
$file
s
=
$ref_arg
->
{
file
s
};
my
$verbose
=
$ref_arg
->
{
verbose
};
my
$dbi
=
$ref_arg
->
{
dbi
};
$dbi
=
$self
->
dbi
unless
defined
$dbi
;
if
((
!
defined
$source_id
)
or
(
!
defined
$species_id
)
or
(
!
defined
$file
)
){
if
((
!
defined
$source_id
)
or
(
!
defined
$species_id
)
or
(
!
defined
$file
s
)
){
croak
"
Need to pass source_id, species_id and file as pairs
";
}
$verbose
|=
0
;
my
$wget
=
"";
if
(
$file
=~
/wget[=][>](\S+?)[,]/
){
$wget
=
$
1
;
}
my
$file
=
@
{
$files
}[
0
];
my
%label
;
my
%version
;
...
...
@@ -111,19 +106,18 @@ sub run_script {
my
$ccds_missing
=
0
;
my
$entrezgene_missing
=
0
;
my
$
response
=
$ua
->
get
(
$wget
);
if
(
!
$response
->
is_success
()
)
{
die
$response
->
status_line
;
my
$
mgi_io
=
$self
->
get_filehandle
(
$file
);
if
(
!
defined
$mgi_io
)
{
print
STDERR
"
ERROR: Could not open
$file
\n
";
return
1
;
# 1 is an error
}
else
{
#
#
##chromosome g_accession gene gene_id ccds_id ccds_status cds_strand cds_from cds_to cds_locations match_type
#1 NC_000067.5 Xkr4 497097 CCDS14803.1 Public - 3206102 3661428 [3206102-3207048, 3411782-3411981, 3660632-3661428] Identical
#1 NC_000067.5 Rp1h 19888 CCDS14804.1 Public - 4334680 4342905 [4334680-4340171, 4341990-4342161, 4342282-4342905] Identical
my
@lines
=
split
(
/\n/
,
$response
->
content
);
foreach
my
$line
(
@lines
){
while
(
my
$line
=
$mgi_io
->
getline
())
{
my
(
$chrom
,
$g_acc
,
$gene_name
,
$entrez_id
,
$ccds
,
@junk
)
=
split
(
/\t/
,
$line
);
if
(
defined
(
$ccds_label_to_xref_id
{
$ccds
})){
if
(
defined
(
$accession
{
$gene_name
})
and
...
...
@@ -148,7 +142,6 @@ sub run_script {
$ccds_missing
++
;
}
}
}
print
"
$ccds_missing
ccds not resolved,
$entrezgene_missing
mgi not found. Added
$count
MGI xrefs via CCDS
\n
"
if
(
$verbose
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
misc-scripts/xref_mapping/xref_config.ini
+
2
−
2
View file @
8296ce89
...
...
@@ -1475,7 +1475,7 @@ priority = 3
prio_descr
=
ccds
parser
=
MGI_CCDS_Parser
release_uri
=
data_uri
=
script:wget=>
ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_mouse/CCDS.current.txt
,
data_uri
=
ftp://ftp.ncbi.nlm.nih.gov/pub/CCDS/current_mouse/CCDS.current.txt
[source Orphanet::homo_sapiens]
...
...
@@ -6900,7 +6900,7 @@ source = Uniprot/SWISSPROT::MULTI
source
=
UniParc::MULTI
source
=
RFAM::MULTI
source
=
miRBase::MULTI
source
=
ArrayExpress::MULTI
source
=
ArrayExpress::MULTI
[species oryzias_latipes]
taxonomy_id
=
8090
...
...
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