58e45f0c6f05727b8cf72d21e83925e062297b30
hiram
  Sat Dec 11 21:55:23 2021 -0800
avoid running tandemDups on assemblies with more than 100,000 contigs no redmine

diff --git src/hg/utils/automation/doAssemblyHub.pl src/hg/utils/automation/doAssemblyHub.pl
index 9567309..74da44a 100755
--- src/hg/utils/automation/doAssemblyHub.pl
+++ src/hg/utils/automation/doAssemblyHub.pl
@@ -1513,30 +1513,36 @@
 fi
 _EOF_
   );
   $bossScript->execute();
 } # doGapOverlap
 
 #########################################################################
 # * step: tandemDups [workhorse]
 sub doTandemDups {
   my $runDir = "$buildDir/trackData/tandemDups";
   if (! -s "$buildDir/$asmId.unmasked.2bit") {
     &HgAutomate::verbose(1,
 	"ERROR: tandemDups: can not find $buildDir/$asmId.unmasked.2bit\n");
     exit 255;
   }
+  my $ctgCount = `grep -c '^' $buildDir/$asmId.chrom.sizes`;
+  chomp $ctgCount;
+  if ( $ctgCount > 100000) {
+   &HgAutomate::verbose(1, "# tandemDups step too many contigs at $ctgCount\n");
+       return;
+  }
   if (-d "${runDir}" ) {
      if (! -s "$runDir/$asmId.tandemDups.bb") {
        &HgAutomate::verbose(1,
        "WARNING tandemDups step may already be running, but not completed ?\n");
        return;
      } elsif (! needsUpdate("$buildDir/$asmId.unmasked.2bit", "$runDir/$asmId.tandemDups.bb")) {
        &HgAutomate::verbose(1, "# tandemDups step previously completed\n");
        return;
      }
   }
 
   &HgAutomate::mustMkdir($runDir);
 
   my $whatItDoes = "construct tandem dups track (nearby pairs of exact duplicate sequence)";
   my $bossScript = newBash HgRemoteScript("$runDir/doTandemDups.bash",