src/hg/encode/encodeLoad/doEncodeLoad.pl 1.65
1.65 2009/05/28 22:17:00 tdreszer
Load should now make the RawSignals files but put them in 'raw' subdir. Fixed some typos.
Index: src/hg/encode/encodeLoad/doEncodeLoad.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeLoad/doEncodeLoad.pl,v
retrieving revision 1.64
retrieving revision 1.65
diff -b -B -U 4 -r1.64 -r1.65
--- src/hg/encode/encodeLoad/doEncodeLoad.pl 29 Apr 2009 23:24:09 -0000 1.64
+++ src/hg/encode/encodeLoad/doEncodeLoad.pl 28 May 2009 22:17:00 -0000 1.65
@@ -241,20 +241,20 @@
sub loadBigBed
{
# Load bigBed using a .as file
- my ($assembly, $tableName, $fileList, $sqlTable, $pushQ) = @_;
+ my ($assembly, $tableName, $fileList, $sqlTable, $pushQ, $configPath) = @_;
HgAutomate::verbose(2, "loadBigBed ($assembly, $tableName, $fileList, $sqlTable, $pushQ)\n");
if(!$opt_skipLoad) {
if(!(-e "$Encode::sqlCreate/${sqlTable}.as")) {
die "AutoSql schema '$Encode::sqlCreate/${sqlTable}.as' does not exist\n";
}
- if (scalar(split(" ", $filelist)) != 1) {
- die "BigBed must be loaded with a single file but a list of files was supplied ($filelist)\n";
+ if (scalar(split(" ", $fileList)) != 1) {
+ die "BigBed must be loaded with a single file but a list of files was supplied ($fileList)\n";
}
# Create bigBed binary file
- my @cmds = ( "/cluster/bin/x86_64/bedToBigBed -as=$Encode::sqlCreate/${sqlTable}.as $filelist $configPath/${assembly}_chromInfo.txt ${tableName}.bb");
+ my @cmds = ( "/cluster/bin/x86_64/bedToBigBed -as=$Encode::sqlCreate/${sqlTable}.as $fileList $configPath/${assembly}_chromInfo.txt ${tableName}.bb");
HgAutomate::verbose(2, "loadBigBed cmds [".join(" ; ",@cmds)."]\n");
my $safe = SafePipe->new(CMDS => \@cmds, STDOUT => "/dev/null", DEBUG => $opt_verbose > 2);
if(my $err = $safe->exec()) {
die("ERROR: File(s) '$fileList' failed bedToBigBed:\n" . $safe->stderr() . "\n");
@@ -263,18 +263,18 @@
}
# symlink bigBed binary file into gbdb bbi directory
@cmds = ( "ln -sf ${tableName}.bb /gbdb/${assembly}/bbi/");
HgAutomate::verbose(2, "loadBigBed cmds [".join(" ; ",@cmds)."]\n");
- my $safe = SafePipe->new(CMDS => \@cmds, STDOUT => "/dev/null", DEBUG => $opt_verbose > 2);
+ $safe = SafePipe->new(CMDS => \@cmds, STDOUT => "/dev/null", DEBUG => $opt_verbose > 2);
if(my $err = $safe->exec()) {
die("ERROR: File(s) '$fileList' failed symbolic link to gbdb bigBed directory:\n" . $safe->stderr() . "\n");
} else {
print "$fileList loaded into $tableName\n";
}
# create BigBed link table from trackDb to gbdb bigBed binary file
@cmds = ( "/cluster/bin/x86_64/hgBbiDbLink $assembly $tableName /gbdb/${assembly}/bbi/${tableName}.bb");
HgAutomate::verbose(2, "loadBigBed cmds [".join(" ; ",@cmds)."]\n");
- my $safe = SafePipe->new(CMDS => \@cmds, STDOUT => "/dev/null", DEBUG => $opt_verbose > 2);
+ $safe = SafePipe->new(CMDS => \@cmds, STDOUT => "/dev/null", DEBUG => $opt_verbose > 2);
if(my $err = $safe->exec()) {
die("ERROR: File(s) '$fileList' failed bed load:\n" . $safe->stderr() . "\n");
} else {
print "$fileList loaded into $tableName\n";
@@ -440,19 +440,20 @@
} elsif($type eq "genePred" ) {
loadGene($assembly, $tablename, $files, $pushQ, "-genePredExt");
} elsif ($type eq "wig") {
# Copy signal data to hgdownload (unless we created it).
- if(@files == 1) {
- $hgdownload = $files[0] !~ /^$Encode::autoCreatedPrefix/;
- } else {
+ # NOTE: We are now making the RawSignals but they are put in the subdirectory "raw"
+ #if(@files == 1) {
+ # $hgdownload = $files[0] !~ /^$Encode::autoCreatedPrefix/;
+ #} else {
$hgdownload = 1;
- }
+ #}
loadWig($assembly, $tablename, $files, $pushQ);
} elsif ($extendedTypes{$type}) {
loadBedFromSchema($assembly, $tablename, $files, $type, $pushQ);
$hgdownload = @files;
} elsif ($bigBedTypes{$type}) {
- loadBigBed($assembly, $tablename, $files, $type, $pushQ);
+ loadBigBed($assembly, $tablename, $files, $type, $pushQ, $configPath);
$hgdownload = @files;
} elsif ($type =~ /^bed (3|4|5|6|8|9|12)$/) {
loadBed($assembly, $tablename, $files, $pushQ);
$hgdownload = @files;
@@ -465,8 +466,12 @@
HgAutomate::verbose(2, "Done loading. Now making links and copies. hgdownload=[$hgdownload]\n");
if(!$opt_skipDownload and $hgdownload) {
# soft link file(s) into download dir - gzip files as appropriate
my $target = "$downloadDir/$tablename.$type.gz";
+ # NOTE: We are now making the RawSignals but they are put in the subdirectory "raw"
+ if(@files == 1 && $files[0] =~ /^$Encode::autoCreatedPrefix/) {
+ $target = "$downloadDir/raw/$tablename.$type.gz";
+ }
$target =~ s/ //g; # removes space in ".bed 6.gz" for example
unlink($target);
HgAutomate::verbose(2, "unlink($target)\n");