8edeca715fd909f21ec673b9e879788da8f44d6c hiram Thu Feb 13 12:49:57 2020 -0800 beginning to add version 99 definitions and allow the process to skip download step already done refs #24963 diff --git src/hg/utils/automation/doEnsGeneUpdate.pl src/hg/utils/automation/doEnsGeneUpdate.pl index 9e3b7cb..a6a6445 100755 --- src/hg/utils/automation/doEnsGeneUpdate.pl +++ src/hg/utils/automation/doEnsGeneUpdate.pl @@ -549,35 +549,40 @@ } $bossScript->add(<<_EOF_ grep -v "^#" infoOut.txt | awk '{printf "%s\\t%s,%s,%s,%s,%s\\n", \$1,\$2,\$3,\$8,\$9,\$10}' > $db.ensGene.nameIndex.txt ixIxx $db.ensGene.nameIndex.txt $db.ensGene.name.ix $db.ensGene.name.ixx _EOF_ ); } $bossScript->execute() if (! $opt_debug); } # doProcess ######################################################################### # * step: download [dbHost] sub doDownload { my $runDir = "$buildDir/download"; - # First, make sure we're starting clean. + # check if been already done + if (-s "$runDir/$ensGtfFile" && -s "$runDir/$ensPepFile" ) { + &HgAutomate::verbose(1, + "# step download is already completed, continuing...\n"); + return; + } + # If not already done, then it should be clean. if (-d "$runDir" && ! $opt_debug) { - die "ERROR: download: looks like this was run successfully already\n" . - "($runDir exists)\nEither run with -continue=process or some later\n" . - "stage, or move aside/remove\n$runDir\nand run again.\n"; + die "ERROR: download: looks like this was attempted unsuccessfully" . + " before.\n($runDir exists, download files do not)\n"; } &HgAutomate::mustMkdir($runDir); my $whatItDoes = "download data from Ensembl FTP site."; my $bossScript = new HgRemoteScript("$runDir/doDownload.csh", $dbHost, $runDir, $whatItDoes); $bossScript->add(<<_EOF_ wget --tries=2 --user=anonymous --password=ucscGenomeBrowser\@ucsc.edu \\ $ensGtfUrl \\ -O $ensGtfFile wget --tries=2 --user=anonymous --password=ucscGenomeBrowser\@ucsc.edu \\ $ensPepUrl \\ -O $ensPepFile _EOF_