eeac40956b3dd6611f58aeb847ff5c404d3ce883
angie
  Fri Dec 1 09:05:41 2023 -0800
Support trees whose reference/root is not from a db or hub, but rather a custom .2bit file.
This means that the selected pathogen may or may not also be a db/hub, so the selection interacts with the db cart variable but does not always match it.
Also, in phyloPlace.c, update RSV metadata column headers (RGCC lineages replace Ramaekers 2020 clades).

diff --git src/hg/hgPhyloPlace/phyloPlaceMain.c src/hg/hgPhyloPlace/phyloPlaceMain.c
index 07b51be..bcbbc19 100644
--- src/hg/hgPhyloPlace/phyloPlaceMain.c
+++ src/hg/hgPhyloPlace/phyloPlaceMain.c
@@ -1,70 +1,70 @@
 /* phyloPlace: place SARS-CoV-2 sequences in phylogenetic tree using add_missing_samples program. */
 
 /* Copyright (C) 2020-2022 The Regents of the University of California */
 
 #include "common.h"
 #include "cart.h"
 #include "knetUdc.h"
 #include "linefile.h"
 #include "options.h"
 #include "trackHub.h"
 #include "hubConnect.h"
 #include "phyloPlace.h"
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "phyloPlace - Place SARS-CoV-2 sequences in phylogenetic tree using add_missing_samples program\n"
   "usage:\n"
   "   phyloPlace file.[fa|vcf]\n"
   "options:\n"
   "   -db=D                db (default: wuhCor1)\n"
   "   -protobuf=F          Protobuf (from first column of protobufs.tab, with hgPhyloPlaceData/db\n"
   "                        prepended; default: value from first line)\n"
   "   -subtreeSize=N       Value to pass to usher option --print-subtrees-size\n"
   );
 }
 
 /* Command line validation table. */
 static struct optionSpec options[] = {
     { "db", OPTION_STRING },
     { "protobuf", OPTION_STRING },
     { "subtreeSize", OPTION_INT },
     {NULL, 0},
 };
 
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
 if (argc != 2)
     usage();
 char *userSeqOrVcf = argv[1];
 struct lineFile *lf = lineFileOpen(userSeqOrVcf, TRUE);
 char *db = optionVal("db", "wuhCor1");
 char *protobuf = optionVal("protobuf", NULL);
 int subtreeSize = optionInt("subtreeSize", 50);
 boolean success = FALSE;
 
 int timeout = 300;
 if (udcCacheTimeout() < timeout)
     udcSetCacheTimeout(timeout);
 knetUdcInstall();
 
 if (isHubTrack(db))
     {
     // Connect to hubs so phyloPlaceSamples doesn't croak later.
     struct cart *cart = cartOfNothing();
     struct slName *supportedDbs = phyloPlaceDbList(cart);
     if (! slNameInList(supportedDbs, db))
         errAbort("Can't find db '%s'", db);
     }
-char *ctFile = phyloPlaceSamples(lf, db, protobuf, TRUE, subtreeSize, 9, &success);
+char *ctFile = phyloPlaceSamples(lf, "hg38", db, protobuf, TRUE, subtreeSize, 9, &success);
 if (ctFile)
     printf("ctFile = %s\n", ctFile);
 else
     printf("no ctFile.\n");
 return (success == TRUE);
 }