Commit 7bde4cb8 authored by Ian Sealy's avatar Ian Sealy
Browse files

Make ZFINParser handle synonyms.

parent 75b70e78
......@@ -97,7 +97,33 @@ sub run {
$refseq_io->close();
my (%zfin) = %{XrefParser::BaseParser->get_valid_codes("zfin",$species_id)};
my $zfin_io = $self->get_filehandle( $dir . '/aliases.txt' );
if ( !defined $zfin_io ) {
print "ERROR: Could not open $dir/aliases.txt\n";
return 1;
}
#ZDB-GENE-000125-4 deltaC dlc bea
#ZDB-GENE-000125-4 deltaC dlc beamter
my $syncount = 0;
while ( $_ = $zfin_io->getline() ) {
chomp;
my ($acc, undef, undef, $syn) = split (/\t/,$_);
if(defined($zfin{$acc})){
XrefParser::BaseParser->add_to_syn($acc, $source_id, $syn);
$syncount++;
}
}
$zfin_io->close();
print "\t$spcount xrefs from Swissprot and $rscount xrefs from RefSeq succesfully loaded\n";
print "\t$syncount synonyms loaded\n";
print "\t$mismatch xrefs ignored\n";
return 0;
}
......
......@@ -505,7 +505,7 @@ INSERT INTO source_url (source_id, species_id, url, checksum, file_modified_date
INSERT INTO source_url (source_id, species_id, url, checksum, file_modified_date, upload_date, parser) VALUES (1070, 7955,'ftp://ftp.geneontology.org/pub/go/gene-associations/gene_association.zfin.gz', '', now(), now(), "GOParser");
## ZFIN
INSERT INTO source_url (source_id, species_id, url, checksum, file_modified_date, upload_date, parser) VALUES (1400, 7955,'http://zfin.org/data_transfer/Downloads/refseq.txt http://zfin.org/data_transfer/Downloads/swissprot.txt', '', now(), now(), "ZFINParser");
INSERT INTO source_url (source_id, species_id, url, checksum, file_modified_date, upload_date, parser) VALUES (1400, 7955,'http://zfin.org/data_transfer/Downloads/refseq.txt http://zfin.org/data_transfer/Downloads/swissprot.txt http://zfin.org/data_transfer/Downloads/aliases.txt', '', now(), now(), "ZFINParser");
## IPI
INSERT INTO source_url (source_id, species_id, url, checksum, file_modified_date, upload_date, parser) VALUES (5, 7955,'ftp://ftp.ebi.ac.uk/pub/databases/IPI/current/ipi.BRARE.fasta.gz', '', now(), now(), "IPIParser");
......
Markdown is supported
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