SF.net SVN: gmod:[25289] schema/trunk/chado/bin/gmod_load_cvterms.pl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SF.net SVN: gmod:[25289] schema/trunk/chado/bin/gmod_load_cvterms.pl

nm249
Revision: 25289
          http://sourceforge.net/p/gmod/svn/25289
Author:   nm249
Date:     2013-07-16 17:49:23 +0000 (Tue, 16 Jul 2013)
Log Message:
-----------
dbxref accession is varchar 255

Modified Paths:
--------------
    schema/trunk/chado/bin/gmod_load_cvterms.pl

Modified: schema/trunk/chado/bin/gmod_load_cvterms.pl
===================================================================
--- schema/trunk/chado/bin/gmod_load_cvterms.pl 2013-05-29 17:04:46 UTC (rev 25288)
+++ schema/trunk/chado/bin/gmod_load_cvterms.pl 2013-07-16 17:49:23 UTC (rev 25289)
@@ -491,7 +491,8 @@
                       my $def_dbxref = $dblink->database() . ':' .  $dblink->primary_id();
                       $file_def_dbxrefs{uc($def_dbxref)}=1;
                       message("adding definition dbxref $def_dbxref to cvterm_dbxref\n");
-                      $db_index{$k}->add_secondary_dbxref($def_dbxref, 1);
+      $def_dbxref = substr($def_dbxref, 0, 255);
+      $db_index{$k}->add_secondary_dbxref($def_dbxref, 1);
                   }
               }
           }
@@ -568,12 +569,13 @@
 
  foreach my $i ($novel_terms{$k}->get_secondary_ids()) { #store secondary ids in cvterm_dbxref
     message("adding secondary dbxref '$i' to cvterm_dbxref\n");
-
+    $i = substr($i, 0, 255);
     $new_term->add_secondary_dbxref($i);
  }
  foreach my $r ($novel_terms{$k}->get_dbxrefs() ) { #store definition's dbxrefs in cvterm_dbxref
     if (!$r->database || !$r->primary_id) { next; } # skip def. dbxrefs without both db_name and accession
     my $def_dbxref= $r->database() . ':' . $r->primary_id();
+    $def_dbxref = substr($def_dbxref, 0, 255);
     message("adding definition dbxref $def_dbxref to cvterm_dbxref\n");
     $new_term->add_secondary_dbxref($def_dbxref, 1);
  }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-schema-cmts mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema-cmts