Skip to content
Snippets Groups Projects
Commit bcd243c4 authored by Ian Longden's avatar Ian Longden
Browse files

dependencys added so that for a source to be loaded then all of its...

dependencys added so that for a source to be loaded then all of its dependecies must be loaded before it. Stored in a table dependent_source.
parent 65aabbcc
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,15 @@ CREATE TABLE synonym (
################################################################################
CREATE TABLE dependent_source (
master_source_id int unsigned not null,
dependent_source_id int unsigned not null,
PRIMARY KEY (master_source_id, dependent_source_id)
) COLLATE=latin1_swedish_ci TYPE=InnoDB;
################################################################################
CREATE TABLE source (
source_id int unsigned not null auto_increment,
......
......@@ -1089,7 +1089,6 @@ data_uri =
name = HGNC
download = Y
order = 30
#order 51
priority = 2
prio_descr = ccds
parser = HGNC_CCDSParser
......@@ -1128,6 +1127,7 @@ order = 29
priority = 4
prio_descr = entrezgene_manual
parser = HGNCParser
dependent = EntrezGene::MULTI,Uniprot/SWISSPROT::MULTI,RefSeq_dna::homo_sapiens,RefSeq_dna::homo_sapiens#01,RefSeq_peptide::homo_sapiens
release_uri =
data_uri = http://www.genenames.org/cgi-bin/hgnc_downloads.cgi?title=Genew+output+data&col=gd_hgnc_id&col=gd_app_sym&col=gd_app_name&col=gd_prev_sym&col=gd_aliases&col=gd_pub_eg_id&col=gd_pub_refseq_ids&col=md_eg_id&col=md_refseq_id&col=gd_pub_ensembl_id&col=md_prot_id&col=gd_lsdb_links&status=Approved&status=Approved+Non-Human&status_opt=3&=on&where=&order_by=gd_hgnc_id&limit=&format=text&submit=submit&.cgifields=&.cgifields=status&.cgifields=chr
......
......@@ -172,5 +172,21 @@ foreach my $species_section ( sort( $config->GroupMembers('species') ) )
$config->val( $source_section, 'parser' ) );
print("\n");
my @dependents =
split( /\,/, $config->val( $source_section, 'dependent', '' ) );
foreach my $dep (@dependents){
my $dep_name = "source $dep";
print "# adding source dependency that $source_section needs $dep_name loaded first\n";
if ( !exists( $source_ids{$dep_name} ) ) {
die( sprintf( "Can not find dependent source section '[%s]'\n"
. "while reading species section '[%s]'\n",
$dep, $species_section ) );
}
print "INSERT INTO dependent_source (master_source_id, dependent_source_id)\n";
printf( "VALUES (%d, %d);\n\n", $source_ids{$source_section}, $source_ids{$dep_name});
}
} ## end foreach my $source_name ( sort...)
} ## end foreach my $species_section...
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