705420e703b067fbcad43ab67ed3e131552e7ac8 angie Wed Apr 24 14:23:03 2024 -0700 Pathogen drop-down choices can now be groups of references/trees, for example 'Dengue (types 1 - 4)' instead of a separate choice for each type. Instead of config.ra, each group has an organism.ra and subdirectories named after reference accessions that contain reference.ra files. nextclade sort is used to match the user's uploaded sequences against available references for the selected pathogen. SARS-CoV-2, M. tuberculosis and hMPXV still have only one reference and still use config.ra, but RSV, Dengue and Influenza will become groups. Presentation is still kinda rough, just a loop on the original results output. The server commands part needs testing and will not work yet for groups (currently used only for SARS-CoV-2). diff --git src/hg/hgPhyloPlace/phyloPlaceMain.c src/hg/hgPhyloPlace/phyloPlaceMain.c index 95acda9..4e50edf 100644 --- src/hg/hgPhyloPlace/phyloPlaceMain.c +++ src/hg/hgPhyloPlace/phyloPlaceMain.c @@ -1,18 +1,18 @@ /* 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 */ +/* Copyright (C) 2020-2024 The Regents of the University of California */ #include "common.h" #include "cart.h" #include "hdb.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( @@ -35,43 +35,42 @@ {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; +struct cart *cart = cartOfNothing(); int timeout = 300; if (udcCacheTimeout() < timeout) udcSetCacheTimeout(timeout); knetUdcInstall(); char *realDb = NULL; if (isHubTrack(db)) { realDb = db; // Connect to hubs so phyloPlaceSamples doesn't croak later. - struct cart *cart = cartOfNothing(); - struct slName *supportedDbs = phyloPlaceDbList(cart); - if (! slNameInList(supportedDbs, db)) + struct slPair *orgLabelList = phyloPlaceOrgList(cart); + if (! slPairFind(orgLabelList, db)) errAbort("Can't find db '%s'", db); } else if (hDbExists(db)) realDb = db; else realDb = "hg38"; -char *ctFile = phyloPlaceSamples(lf, realDb, db, protobuf, TRUE, subtreeSize, 9, &success); -if (ctFile) - printf("ctFile = %s\n", ctFile); -else - printf("no ctFile.\n"); +struct trackLayout tl; +ZeroVar(&tl); +tl.fontHeight = 9; +tl.leftLabelWidthChars = -1; +boolean success = phyloPlaceSamples(lf, realDb, db, protobuf, TRUE, subtreeSize, &tl, cart); return (success == TRUE); }