src/hg/encode/encodeLoad/doEncodeLoad.pl 1.71

1.71 2009/10/06 00:52:26 kate
Add support for 'sql' field in DAF. Allows specifying the schema for a non-standard table. The .sql file needs to be copied to /cluster/bin//sqlCreate
Index: src/hg/encode/encodeLoad/doEncodeLoad.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeLoad/doEncodeLoad.pl,v
retrieving revision 1.70
retrieving revision 1.71
diff -b -B -U 4 -r1.70 -r1.71
--- src/hg/encode/encodeLoad/doEncodeLoad.pl	3 Sep 2009 22:51:06 -0000	1.70
+++ src/hg/encode/encodeLoad/doEncodeLoad.pl	6 Oct 2009 00:52:26 -0000	1.71
@@ -420,8 +420,9 @@
 
     # temporary work-around (XXXX, galt why is this "temporary?").
     my $assembly = $h->{assembly};
     my $type = $h->{type};
+    my $sql = $h->{sql};
     my $files = $h->{files};
     my $downloadOnly = (defined($h->{downloadOnly}) and $h->{downloadOnly});  # Could also gzip and link files for displayed tracks!
     my @files = split(/\s+/, $files);
     my %extendedTypes = map { $_ => 1 } @Encode::extendedTypes;
@@ -450,8 +451,11 @@
         loadWig($assembly, $tablename, $files, $pushQ);
     } elsif ($extendedTypes{$type}) {
         loadBedFromSchema($assembly, $tablename, $files, $type, $pushQ);
         $hgdownload = @files;
+    } elsif ($type =~ /^bed/ and defined($sql)) {
+        loadBedFromSchema($assembly, $tablename, $files, $sql, $pushQ);
+        $hgdownload = @files;
     } elsif ($bigBedTypes{$type}) {
         loadBigBed($assembly, $tablename, $files, $type, $pushQ, $configPath);
         $hgdownload = @files;
     } elsif ($type =~ /^bed (3|4|5|6|8|9|12)$/) {