Changeset 365

Show
Ignore:
Timestamp:
05/29/10 23:38:33 (21 months ago)
Author:
AlexanderPico
Message:

Added HGNC symbol as primary id

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dbbuilder/src/org/bridgedb/extract/Ensembl_ETL_Device_v18_local.pl

    r364 r365  
    840840                                             "\'http://www.genenames.org\'"], 
    841841                                'HEADER' => ['ID VARCHAR(128) NOT NULL DEFAULT \'\'',  
    842                                              'Symbol VARCHAR(128) NOT NULL DEFAULT \'\'',  
     842                                             'Alt VARCHAR(128) NOT NULL DEFAULT \'\'',  
    843843                                             'Description VARCHAR(255) DEFAULT NULL', 
    844844                                             'Synonyms VARCHAR(255) DEFAULT NULL', 
     
    18991899        elsif ($dbe_dbname =~ /^\'HGNC\'$/){   
    19001900            $ADMIN_Xrefs{$dbe_dbname}[10] = "\'Y\'"; # collected 
    1901             if (!${$seen{HUGO}{$dbe_primary_id}}++){  
    1902                 $$GeneTables{HUGO}{$count.$dot.$subcount{HUGO}} = [$dbe_primary_id, $dbe_display_id, $dbe_description, $dbe_syns]; 
    1903                 $$Ensembl_GeneTables{HUGO}{$count.$dot.$subcount{HUGO}} = [$gene_stable_id, $dbe_primary_id]; 
     1901            ## NOTE: working with symbols as primary id; storing numerical identifier as 'Alt' in attributes  
     1902            if (!${$seen{HUGO}{$dbe_display_id}}++){  
     1903                $$GeneTables{HUGO}{$count.$dot.$subcount{HUGO}} = [$dbe_display_id, $dbe_primary_id, $dbe_description, $dbe_syns]; 
     1904                $$Ensembl_GeneTables{HUGO}{$count.$dot.$subcount{HUGO}} = [$gene_stable_id, $dbe_display_id]; 
    19041905                #process Attributes 
    19051906                unless ($dbe_primary_id eq $dbe_display_id){ 
    1906                         $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}} = [$dbe_primary_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Symbol'), $dbe_display_id]; 
     1907                        $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}} = [$dbe_display_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Alt'), $dbe_primary_id]; 
    19071908                } 
    19081909                #@syns = (@syns, $dbe_display_id); 
    1909                 $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}.$dot.'1'} = [$dbe_primary_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Synonyms'), @syns]; 
    1910                 $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}.$dot.'2'} = [$dbe_primary_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Description'), $dbe_description]; 
     1910                $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}.$dot.'1'} = [$dbe_display_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Synonyms'), @syns]; 
     1911                $$Attributes{HUGO}{$count.$dot.$subcount{HUGO}.$dot.'2'} = [$dbe_display_id, mysql_quotes( $$GeneTables{HUGO}{'NAME'}[1]), mysql_quotes('Description'), $dbe_description]; 
    19111912                ++$subcount{HUGO}; 
    19121913            }