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/vcfRenameAndPrune/vcfRenameAndPrune.c src/hg/utils/vcfRenameAndPrune/vcfRenameAndPrune.c
index 04071cf..61a4240 100644
--- src/hg/utils/vcfRenameAndPrune/vcfRenameAndPrune.c
+++ src/hg/utils/vcfRenameAndPrune/vcfRenameAndPrune.c
@@ -1,34 +1,34 @@
/* vcfRenameAndPrune - Rename or remove samples from VCF with genotypes. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "obscure.h"
#include "options.h"
#include "vcf.h"
void usage()
/* Explain usage and exit. */
{
errAbort(
"vcfRenameAndPrune - Rename samples in VCF; if new name not found, remove sample.\n"
"usage:\n"
- " vcfRenameAndPrune vcfIn.vcf[.gz] renaming.tab vcfOut.vcf\n"
+ " vcfRenameAndPrune vcfIn.vcf[.gz] renaming.txt vcfOut.vcf\n"
// "options:\n"
// " -xxx=XXX\n"
- "renaming.tab has two columns: old name (must uniquely match some sample\n"
- "named in #CHROM header line) and new name.\n"
+ "renaming.txt has two whitespace-separated columns: old name (must uniquely match\n"
+ "some sample named in #CHROM header line) and new name.\n"
);
}
/* Command line validation table. */
static struct optionSpec options[] = {
{NULL, 0},
};
void vcfRenameAndPrune(char *vcfInFile, char *renamingFile, char *vcfOutFile)
/* vcfRenameAndPrune - Rename or remove samples from VCF with genotypes. */
{
struct hash *renaming = hashTwoColumnFile(renamingFile);
struct lineFile *lf = lineFileOpen(vcfInFile, TRUE);
FILE *outF = mustOpen(vcfOutFile, "w");
int headerColCount = 0;