08ec019f344fc52bd83ea3a98bedccd0048d732c angie Mon May 24 00:04:08 2021 -0700 Let the user upload a file containing names or IDs of sequences already in the selected tree; run matUtils extract to get subtrees that include those sequences. protobufs.tab gets a new optional column to specify a file that maps alias to tree name/ID (e.g. for mapping EPI_ISL to public names/IDs). diff --git src/hg/hgPhyloPlace/phyloPlaceMain.c src/hg/hgPhyloPlace/phyloPlaceMain.c index be7310f..57e12f8 100644 --- src/hg/hgPhyloPlace/phyloPlaceMain.c +++ src/hg/hgPhyloPlace/phyloPlaceMain.c @@ -1,40 +1,45 @@ /* phyloPlace: place SARS-CoV-2 sequences in phylogenetic tree using add_missing_samples program. */ /* Copyright (C) 2020 The Regents of the University of California */ #include "common.h" #include "linefile.h" #include "options.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" " -subtreeSize=N Value to pass to usher option --print-subtrees-size\n" ); } /* Command line validation table. */ static struct optionSpec options[] = { { "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); int subtreeSize = optionInt("subtreeSize", 50); -char *ctFile = phyloPlaceSamples(lf, "wuhCor1", NULL, TRUE, subtreeSize, 9); -return (ctFile == NULL); +boolean success = FALSE; +char *ctFile = phyloPlaceSamples(lf, "wuhCor1", NULL, TRUE, subtreeSize, 9, &success); +if (ctFile) + printf("ctFile = %s\n", ctFile); +else + printf("no ctFile.\n"); +return (success == TRUE); }