e14c2761ca01d8175578df87bd5311b5c0442bfb angie Thu Nov 19 13:04:01 2020 -0800 New CGI hgPhyloPlace: place SARS-CoV-2 genomes in fasta or VCF on phylogenetic tree using Yatish Turakhia's UShER program; add subtree custom tracks and Nextstrain linkouts to visualize results. refs #25943 diff --git src/hg/hgPhyloPlace/phyloPlaceMain.c src/hg/hgPhyloPlace/phyloPlaceMain.c new file mode 100644 index 0000000..5e22e50 --- /dev/null +++ src/hg/hgPhyloPlace/phyloPlaceMain.c @@ -0,0 +1,40 @@ +/* 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", TRUE, subtreeSize, 9); +return (ctFile == NULL); +}