be6de36d134aa80ccf9c34cf4d14a2adf36f1e24
hiram
  Wed Mar 2 16:32:11 2022 -0800
link the constructed indexes in an assembly hub build into the public crispor data directory for other parts of the procedure no redmine

diff --git src/hg/utils/automation/doCrispr.pl src/hg/utils/automation/doCrispr.pl
index e18b8da..c20c7ed 100755
--- src/hg/utils/automation/doCrispr.pl
+++ src/hg/utils/automation/doCrispr.pl
@@ -157,30 +157,32 @@
   twoBitInfo $twoBit $chromSizes
 fi
 if [ ! -s "$db.fa" ] ; then
   twoBitToFa -noMask $twoBit $db.fa
 fi
 
 if [ ! -s "$db.fa.fai" ]; then
   /cluster/bin/samtools-0.1.19/samtools faidx $db.fa &
 fi
 
 if [ ! -s "$testDone" ]; then
   if [ $forHub = 1 ] ; then
     time ($crisporSrc/tools/crisprAddGenome \\
         fasta $db.fa --baseDir $crisporGenomesDir \\
         --desc='$db|$db|$db|$db') > createIndex.log 2>&1 &
+    rm -f $crisporSrc/genomes/$db
+    ln -s $crisporGenomesDir/$db $crisporSrc/genomes/$db
   else
     time ($crisporSrc/tools/crisprAddGenome \\
         ucscLocal $db --baseDir $crisporSrc/genomes) > createIndex.log 2>&1 &
   fi
 fi
 
 wait
 
 if [ ! -s "$db.fa.fai" ]; then
   printf "ERROR: step indexFa: samtools index of $db.fa has failed\\n" 1>&2
   exit 255
 fi
 if [ ! -s "$testDone" ]; then
    printf "ERROR: bwa index not created correctly\\n" 1>&2
    printf "result file does not exist:\\n" 1>&2