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
f62a3d50
Commit
f62a3d50
authored
16 years ago
by
Rhoda Kinsella
Browse files
Options
Downloads
Patches
Plain Diff
Parser for database of aberrant 3\' and 5\' splice sites (DBASS)
parent
c49afa83
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/xref_mapping/XrefParser/DBASSParser.pm
+82
-0
82 additions, 0 deletions
misc-scripts/xref_mapping/XrefParser/DBASSParser.pm
with
82 additions
and
0 deletions
misc-scripts/xref_mapping/XrefParser/DBASSParser.pm
0 → 100644
+
82
−
0
View file @
f62a3d50
package
XrefParser::
DBASSParser
;
use
strict
;
use
base
qw( XrefParser::BaseParser)
;
# This parser will read direct xrefs from a simple comma-delimited file downloaded from the DBASS database.
# The columns of the file should be the following:
#
# 1) DBASS Gene ID
# 2) DBASS Gene Name
# 3) Ensembl Gene ID
sub
new
{
my
$proto
=
shift
;
my
$class
=
ref
$proto
||
$proto
;
my
$self
=
bless
{},
$class
;
return
$self
;
}
sub
run
{
my
$self
=
shift
;
my
(
$source_id
,
$species_id
,
$filename
)
=
@_
;
my
$file_io
=
$self
->
get_filehandle
(
$filename
);
if
(
!
defined
(
$file_io
)
)
{
return
1
;
}
my
$parsed_count
=
0
;
printf
(
STDERR
"
source = %d
\t
species = %d
\n
",
$source_id
,
$species_id
);
$file_io
->
getline
();
while
(
defined
(
my
$line
=
$file_io
->
getline
()
)
)
{
$line
=~
s/\s*$//
;
my
(
$dbass_gene_id
,
$dbass_gene_name
,
$ensembl_id
)
=
split
(
/,/
,
$line
);
if
(
!
defined
(
$dbass_gene_id
)
||
!
defined
(
$ensembl_id
)
)
{
printf
(
"
Line %d contains has less than two columns.
\n
",
1
+
$parsed_count
);
print
("
The parsing failed
\n
");
return
1
;
}
my
$label
=
$dbass_gene_name
;
my
$type
=
'
gene
';
my
$description
=
'';
my
$version
=
'
1
';
++
$parsed_count
;
my
$xref_id
=
XrefParser::
BaseParser
->
get_xref
(
$dbass_gene_id
,
$source_id
);
if
(
!
defined
(
$xref_id
)
||
$xref_id
eq
''
)
{
$xref_id
=
XrefParser::
BaseParser
->
add_xref
(
$dbass_gene_id
,
$version
,
$label
,
$description
,
$source_id
,
$species_id
);
}
XrefParser::
BaseParser
->
add_direct_xref
(
$xref_id
,
$ensembl_id
,
$type
,
$dbass_gene_id
);
}
## end while ( defined( my $line...
printf
(
"
%d direct xrefs succesfully parsed
\n
",
$parsed_count
);
$file_io
->
close
();
print
"
Done
\n
";
return
0
;
}
## end sub run
1
;
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