e78b1f8b7121149606b00890d327b78c06cd2522
hiram
  Fri Feb 25 11:01:10 2022 -0800
cleaner determination of genBankAccession no redmine

diff --git src/hg/utils/automation/prepConfig.pl src/hg/utils/automation/prepConfig.pl
index 8be29a4..3803823 100755
--- src/hg/utils/automation/prepConfig.pl
+++ src/hg/utils/automation/prepConfig.pl
@@ -74,33 +74,35 @@
        $mySqlCommonName = $commonName;
        $mySqlCommonName =~ s/'/_/g;   # effective escape ' characters for MySQL
     }
     $sciName = $line;
     $sciName =~ s/.*m name:\s+//;
     $sciName =~ s/\s+\(.*//;
   } elsif ($line =~ m/^#\s+Date:/) {
     $asmDate = $line;
     $asmDate =~ s/.*Date:\s+//;
     my ($year, $month, $day) = split('-', $asmDate);
     $asmDate = sprintf("%s %s", $monthNumber[$month], $year);
   } elsif ($line =~ m/^#\s+Submitter:/) {
     $submitter = $line;
     $submitter =~ s/.*Submitter:\s+//;
   } elsif ($line =~ m/^#\s+RefSeq assembly accession:/i) {
+    if ($genBankAccessionID =~ m/notFound/) {
       $genBankAccessionID = $line;
       $genBankAccessionID =~ s/.*ccession:\s+//;
       $genBankAccessionID =~ s/ .*//;
+    }
   } elsif ($line =~ m/^#\s+GenBank assembly accession:/i) {
     if ($genBankAccessionID =~ m/notFound/) {
       $genBankAccessionID = $line;
       $genBankAccessionID =~ s/.*ccession:\s+//;
       $genBankAccessionID =~ s/ .*//;
     }
   } elsif ($line =~ m/^#\s+Taxid:/i) {
     $taxId = $line;
     $taxId =~ s/.*Taxid:\s+//;
   } elsif ($line =~ m/^#\s+BioSample:/) {
     $ncbiBioSample = $line;
     $ncbiBioSample =~ s/.*BioSample:\s+//;
   } elsif ($line =~ m/^#\s+BioProject:/) {
     $ncbiBioProject = $line;
     $ncbiBioProject =~ s/.*BioProject:\s+//;