645b05900827c9a0c59641d6a0a4be33846dc5a3
hiram
  Tue Sep 1 12:48:38 2020 -0700
better descriptive name in column 2 of the GTF file refs #26415

diff --git src/hg/utils/automation/doEnsGeneUpdate.pl src/hg/utils/automation/doEnsGeneUpdate.pl
index e84355b..74c9078 100755
--- src/hg/utils/automation/doEnsGeneUpdate.pl
+++ src/hg/utils/automation/doEnsGeneUpdate.pl
@@ -255,32 +255,39 @@
       printf STDERR "# ensemblSource prev: $prevSum %s this: $thisSum\n",
          $prevSum eq $thisSum ? "==" : "!=";
 
       if (1 == $identicalToPrevious) {
 	print STDERR "previous genes same as new genes";
       }
   } else {
     $identicalToPrevious = 0;
   }
 
 # there are too many things to check to verify identical to previous
 $identicalToPrevious = 0;
 
   $bossScript->add(<<_EOF_
 export db="$db"
-
-genePredToGtf -utr file process/\$db.allGenes.gp.gz stdout | gzip -c > process/\$db.ensGene.v$ensVersion.gtf.gz
+export buildDir=`pwd`
+
+mkdir -p /dev/shm/\$db
+zcat process/\$db.allGenes.gp.gz > /dev/shm/\$db/ensGene.v$ensVersion
+cd /dev/shm/\$db
+genePredToGtf -utr file ensGene.v$ensVersion stdout | gzip -c > \$buildDir/process/\$db.ensGene.v$ensVersion.gtf.gz
+cd \$buildDir
+rm -f /dev/shm/\$db/ensGene.v$ensVersion
+rmdir /dev/shm/\$db
 
 _EOF_
 	  );
 
   if ($dbExists && $identicalToPrevious ) {
       $bossScript->add(<<_EOF_
 hgsql -e 'INSERT INTO trackVersion \\
     (db, name, who, version, updateTime, comment, source, dateReference) \\
     VALUES("$db", "ensGene", "$ENV{'USER'}", "$ensVersion", now(), \\
 	"identical to previous version $previousEnsVersion", \\
 	"identical to previous version $previousEnsVersion", \\
 	"$ensVersionDateReference" );' hgFixed
 featureBits \$db ensGene > fb.\$db.ensGene.txt 2>&1
 _EOF_
 	  );