db42a8012f0dad34f7dbe68a948970d3a17e1524
angie
Mon Oct 26 09:38:10 2020 -0700
hashTwoColumnFile expects whitespace-sep not tab-sep -- update usage message for {phylo,vcf}RenameAndPrune.
diff --git src/hg/utils/phyloRenameAndPrune/phyloRenameAndPrune.c src/hg/utils/phyloRenameAndPrune/phyloRenameAndPrune.c
index 0636628..11f55e4 100644
--- src/hg/utils/phyloRenameAndPrune/phyloRenameAndPrune.c
+++ src/hg/utils/phyloRenameAndPrune/phyloRenameAndPrune.c
@@ -1,33 +1,34 @@
/* phyloRenameAndPrune - Rename or remove leaves of phylogenetic tree and prune any branches with no remaining leaves. */
#include "common.h"
#include "hash.h"
#include "linefile.h"
#include "obscure.h"
#include "options.h"
#include "phyloTree.h"
void usage()
/* Explain usage and exit. */
{
errAbort(
"phyloRenameAndPrune - Rename or remove leaves of phylogenetic tree and prune any branches with no remaining leaves\n"
"usage:\n"
- " phyloRenameAndPrune treeIn.nh renaming.tab treeOut.nh\n"
+ " phyloRenameAndPrune treeIn.nh renaming.txt treeOut.nh\n"
// "options:\n"
// " -xxx=XXX\n"
- "renaming.tab has two columns: old name (must uniquely match some leaf in tree) and new name.\n"
+ "renaming.txt has two whitespace-separated columns: old name (must uniquely match\n"
+ "some leaf in tree) and new name.\n"
);
}
/* Command line validation table. */
static struct optionSpec options[] = {
{NULL, 0},
};
struct phyloTree *rRenameAndPrune(struct phyloTree *node, struct hash *renaming)
{
if (node->numEdges == 0)
{
char *newName = NULL;
if (node->ident->name && (newName = hashFindVal(renaming, node->ident->name)) != NULL)
node->ident->name = newName;