Skip to content
Snippets Groups Projects
Commit 69a24113 authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Proto-parser for CCDS identifiers.

parent fd28f8c1
No related branches found
No related tags found
No related merge requests found
package XrefParser::CCDSParser;
use strict;
use File::Basename;
use XrefParser::BaseParser;
use vars qw(@ISA);
@ISA = qw(XrefParser::BaseParser);
# Parse file of CCDS records and assign direct xrefs
# All assumed to be linked to transcripts
sub run {
my ($self, $file, $source_id, $species_id) = @_;
open(CCDS,"<".$file) || die "Could not open $file\n";
my $count = 0;
while (<CCDS>) {
# TODO extract stable ID, CCDS identifier
my ($stable_id, $ccds) = split;
my $xref_id = $self->add_xref($ccds, 1, $ccds, "", $source_id, $species_id);
$self->add_direct_xref($xref_id, $stable_id, "transcript", "");
$count++;
}
print "Parsed $count CCDS identifiers from $file\n";
}
sub new {
my $self = {};
bless $self, "XrefParser::CCDSParser";
return $self;
}
1;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment