bcf35aa04eb90031bdf817fec6e4262481e77fd8
hiram
  Mon Nov 1 10:31:15 2021 -0700
no need to run WM without the sdust option that other result is never used no redmin

diff --git src/hg/utils/automation/doWindowMasker.pl src/hg/utils/automation/doWindowMasker.pl
index 2b3916b..2b49e08 100755
--- src/hg/utils/automation/doWindowMasker.pl
+++ src/hg/utils/automation/doWindowMasker.pl
@@ -126,58 +126,60 @@
 pushd \$tmpDir
 twoBitToFa \$inputTwoBit \$fa
 \$windowMasker -mk_counts true -input \$fa -output windowmasker.counts
 popd
 cp \$tmpDir/windowmasker.counts .
 rm -rf \$tmpDir
 _EOF_
   );
   $bossScript->execute();
 } # doCount
 
 
 #########################################################################
 # * step: mask [workhorse]
 sub doMask {
-  my $runDir = "$buildDir";
-  &HgAutomate::checkExistsUnlessDebug('count', 'mask', "$runDir/windowmasker.counts");
-  my $whatItDoes = "It does WindowMasker masking step.";
-  my $workhorse = &HgAutomate::chooseWorkhorse();
-  my $bossScript = new HgRemoteScript("$runDir/doMask.csh", $workhorse,
-				      $runDir, $whatItDoes);
-  $bossScript->add(<<_EOF_
-set windowMaskerDir = /cluster/bin/\$MACHTYPE 
-set windowMasker = \$windowMaskerDir/windowmasker
-set fa = $db.fa
-set tmpDir = `mktemp -d -p /scratch/tmp doWindowMasker.XXXXXX`
-chmod 775 \$tmpDir
-set inputTwoBit = $unmaskedSeq
-cp windowmasker.counts \$tmpDir
-pushd \$tmpDir
-twoBitToFa \$inputTwoBit \$fa
-\$windowMasker -ustat windowmasker.counts -input \$fa -output windowmasker.intervals
-perl -wpe \'if \(s\/^\>lcl\\\|\(\.\*\)\\n\$\/\/\) { \$chr = \$1\; } \\
-   if \(\/^\(\\d+\) \- \(\\d+\)\/\) { \\
-   \$s=\$1\; \$e=\$2+1\; s\/\(\\d+\) \- \(\\d+\)\/\$chr\\t\$s\\t\$e\/\; \\
-   }\' windowmasker.intervals > windowmasker.bed
-popd 
-cp \$tmpDir/windowmasker.bed .
-rm -rf \$tmpDir
-_EOF_
-  );
-
-  $bossScript->execute();
+  printf STDERR "# doMask: obsolete step, no longer needed\n";
+  return 0;
+#  my $runDir = "$buildDir";
+#  &HgAutomate::checkExistsUnlessDebug('count', 'mask', "$runDir/windowmasker.counts");
+#  my $whatItDoes = "It does WindowMasker masking step.";
+#  my $workhorse = &HgAutomate::chooseWorkhorse();
+#  my $bossScript = new HgRemoteScript("$runDir/doMask.csh", $workhorse,
+#				      $runDir, $whatItDoes);
+#  $bossScript->add(<<_EOF_
+# set windowMaskerDir = /cluster/bin/\$MACHTYPE
+# set windowMasker = \$windowMaskerDir/windowmasker
+# set fa = $db.fa
+# set tmpDir = `mktemp -d -p /scratch/tmp doWindowMasker.XXXXXX`
+# chmod 775 \$tmpDir
+# set inputTwoBit = $unmaskedSeq
+# cp windowmasker.counts \$tmpDir
+# pushd \$tmpDir
+# twoBitToFa \$inputTwoBit \$fa
+# \$windowMasker -ustat windowmasker.counts -input \$fa -output windowmasker.intervals
+# perl -wpe \'if \(s\/^\>lcl\\\|\(\.\*\)\\n\$\/\/\) { \$chr = \$1\; } \\
+#    if \(\/^\(\\d+\) \- \(\\d+\)\/\) { \\
+#    \$s=\$1\; \$e=\$2+1\; s\/\(\\d+\) \- \(\\d+\)\/\$chr\\t\$s\\t\$e\/\; \\
+#    }\' windowmasker.intervals > windowmasker.bed
+# popd
+# cp \$tmpDir/windowmasker.bed .
+# rm -rf \$tmpDir
+# _EOF_
+#   );
+#
+#  $bossScript->execute();
 } # doMask
 
 #########################################################################
 # * step: sdust [workhorse]
 sub doSdust {
   my $runDir = "$buildDir";
   &HgAutomate::checkExistsUnlessDebug('mask', 'sdust', "$runDir/windowmasker.counts");
   my $whatItDoes = "It does WindowMasker masking step with -sdust true.";
   my $workhorse = &HgAutomate::chooseWorkhorse();
   my $bossScript = new HgRemoteScript("$runDir/doSdust.csh", $workhorse,
 				      $runDir, $whatItDoes);
   $bossScript->add(<<_EOF_
 set windowMaskerDir = /cluster/bin/\$MACHTYPE
 set windowMasker = \$windowMaskerDir/windowmasker
 set fa = $db.fa
@@ -196,79 +198,76 @@
 cp \$tmpDir/windowmasker.sdust.bed .
 rm -rf \$tmpDir
 _EOF_
   );
 
   $bossScript->execute();
 } # doSdust
 
 
 #########################################################################
 # * step: twobit [fileServer]
 sub doTwoBit {
   my $runDir = "$buildDir";
   my $whatItDoes = "Make .2bit files from the beds.";
   &HgAutomate::checkExistsUnlessDebug('sdust', 'twobit', ("$runDir/windowmasker.counts",
-           "$runDir/windowmasker.bed", "$runDir/windowmasker.sdust.bed"));
+           "$runDir/windowmasker.sdust.bed"));
   my $fileServer = &HgAutomate::chooseFileServer($runDir);
   my $bossScript = new HgRemoteScript("$runDir/doTwoBit.csh", $fileServer,
 				      $runDir, $whatItDoes);
   $bossScript->add(<<_EOF_
-twoBitMask $unmaskedSeq windowmasker.bed $db.wmsk.2bit
 twoBitMask $unmaskedSeq windowmasker.sdust.bed $db.wmsk.sdust.2bit
-twoBitToFa $db.wmsk.2bit stdout | faSize stdin >&faSize.$db.wmsk.txt
 twoBitToFa $db.wmsk.sdust.2bit stdout | faSize stdin >&faSize.$db.wmsk.sdust.txt
 _EOF_
   );
   $bossScript->execute();
 } #doTwoBit
 
 #########################################################################
 # * step: load [dbHost]
 sub doLoad {
   my $runDir = "$buildDir";
   my $whatItDoes = "load sdust.bed and filter with gaps to clean";
   &HgAutomate::checkExistsUnlessDebug('twobit', 'load', ("$runDir/$db.wmsk.sdust.2bit",
-           "$runDir/$db.wmsk.2bit", "$runDir/faSize.$db.wmsk.sdust.txt"));
+           "$runDir/faSize.$db.wmsk.sdust.txt"));
   my $bossScript = new HgRemoteScript("$runDir/doLoad.csh", $dbHost,
 				      $runDir, $whatItDoes);
   $bossScript->add(<<_EOF_
 hgLoadBed $db windowmaskerSdust windowmasker.sdust.bed
 featureBits -countGaps $db windowmaskerSdust >&fb.$db.windowmaskerSdust.beforeClean.txt
 featureBits $db -not gap -bed=notGap.bed
 featureBits $db windowmaskerSdust notGap.bed -bed=stdout | gzip -c > cleanWMask.bed.gz
 hgLoadBed $db windowmaskerSdust cleanWMask.bed.gz
 featureBits -countGaps $db windowmaskerSdust >&fb.$db.windowmaskerSdust.clean.txt
 zcat cleanWMask.bed.gz | twoBitMask ../../$db.unmasked.2bit stdin -type=.bed $db.cleanWMSdust.2bit
 twoBitToFa $db.cleanWMSdust.2bit stdout | faSize stdin >& faSize.$db.cleanWMSdust.txt
 featureBits -countGaps $db rmsk windowmaskerSdust >&fb.$db.rmsk.windowmaskerSdust.txt
 _EOF_
   );
   $bossScript->execute();
 } #doLoad
 
 #########################################################################
 # * step: cleanup [fileServer]
 sub doCleanup {
   my $runDir = "$buildDir";
   my $whatItDoes = "It cleans up or compresses intermediate files.";
   my $fileServer = &HgAutomate::chooseFileServer($runDir);
   my $bossScript = new HgRemoteScript("$runDir/doCleanup.csh", $fileServer,
 				      $runDir, $whatItDoes);
   $bossScript->add(<<_EOF_
 gzip $runDir/windowmasker.counts
-gzip $runDir/windowmasker.bed
 gzip $runDir/windowmasker.sdust.bed
 _EOF_
   );
   $bossScript->execute();
 } # doCleanup
 
 
 #########################################################################
 # main
 
 # Prevent "Suspended (tty input)" hanging:
 &HgAutomate::closeStdin();
 
 # Make sure we have valid options and exactly 1 argument:
 &checkOptions();