24d667a6353af7e3d009ff35beb21f85dc40984d hiram Tue Dec 20 10:40:08 2022 -0800 correctly make symLinks for chainNet files at the time they actually exist no redmine diff --git src/hg/utils/automation/doRecipBest.pl src/hg/utils/automation/doRecipBest.pl index 8ca354c..278d0b8 100755 --- src/hg/utils/automation/doRecipBest.pl +++ src/hg/utils/automation/doRecipBest.pl @@ -429,30 +429,42 @@ $bossScript->add(<<_EOF_ cd $runDir hgLoadChain -test -noBin -tIndex $tDb chainRBest$QDb $tDb.$qDb.rbest.chain.gz wget --no-check-certificate -O bigChain.as 'http://genome-source.soe.ucsc.edu/gitlist/kent.git/raw/master/src/hg/lib/bigChain.as' wget --no-check-certificate -O bigLink.as 'http://genome-source.soe.ucsc.edu/gitlist/kent.git/raw/master/src/hg/lib/bigLink.as' sed 's/.000000//' chain.tab | awk 'BEGIN {OFS="\\t"} {print \$2, \$4, \$5, \$11, 1000, \$8, \$3, \$6, \$7, \$9, \$10, \$1}' > chainRBest${QDb}.tab bedToBigBed -type=bed6+6 -as=bigChain.as -tab chainRBest${QDb}.tab $targetSizes chainRBest${QDb}.bb awk 'BEGIN {OFS="\\t"} {print \$1, \$2, \$3, \$5, \$4}' link.tab | sort -k1,1 -k2,2n > $QDbLink.tab bedToBigBed -type=bed4+1 -as=bigLink.as -tab $QDbLink.tab $targetSizes $QDbLink.bb set totalBases = `ave -col=2 $targetSizes | grep "^total" | awk '{printf "%d", \$2}'` set basesCovered = `bedSingleCover.pl $QDbLink.tab | ave -col=4 stdin | grep "^total" | awk '{printf "%d", \$2}'` set percentCovered = `echo \$basesCovered \$totalBases | awk '{printf "%.3f", 100.0*\$1/\$2}'` printf "%d bases of %d (%s%%) in intersection\\n" "\$basesCovered" "\$totalBases" "\$percentCovered" > ../fb.$tDb.chainRBest.$QDb.txt rm -f link.tab rm -f chain.tab +if ( -s "\$buildDir/axtChain/chainRBest${QDb}.bb" ) then + mkdir -p /gbdb/$tDb/chainNet + rm -f "/gbdb/$tDb/chainNet/$tDb.chainRBest$QDb.bb" "/gbdb/$tDb/chainNet/$tDb.chainRBest${QDb}Link.bb" + ln -s "\$buildDir/axtChain/chainRBest${QDb}.bb" "/gbdb/$tDb/chainNet/$tDb.chainRBest$QDb.bb" + ln -s "\$buildDir/axtChain/chainRBest${QDb}Link.bb" "/gbdb/$tDb/chainNet/$tDb.chainRBest${QDb}Link.bb" +endif +if ( -s "\$buildDir/bigMaf/$tDb.$qDb.rbestNet.bb" ) then + mkdir -p /gbdb/$tDb/chainNet + rm -f "/gbdb/$tDb/chainNet/$tDb.$qDb.rbestNet.bb" "/gbdb/$tDb/chainNet/$tDb.$qDb.rbestNet.summary.bb" + ln -s "\$buildDir/bigMaf/$tDb.$qDb.rbestNet.bb" "/gbdb/$tDb/chainNet/$tDb.$qDb.rbestNet.bb" + ln -s "\$buildDir/bigMaf/$tDb.$qDb.rbestNet.summary.bb" "/gbdb/$tDb/chainNet/$tDb.$qDb.rbestNet.summary.bb" +endif _EOF_ ); } # else if (! $opt_trackHub && $dbExists) $bossScript->execute(); } # sub loadRBest {} sub cleanUp { my $runDir = "$buildDir"; my $whatItDoes = "cleanup temporary files used by RBest procedure."; my $bossScript = newBash HgRemoteScript("$runDir/rBestCleanUp.bash", $dbHost, $runDir, $whatItDoes); $bossScript->add(<<_EOF_ rm -fr axtChain/experiments rm -f axtChain/bigChain.as axtChain/bigLink.as