From b9793a71949522291733fae3719fa7919f96ad06 Mon Sep 17 00:00:00 2001 From: Shane McCarthy Date: Fri, 21 Feb 2014 15:52:14 +0000 Subject: [PATCH] usage displays for .vcf.gz only - include note on main usage page about indexed/un-indexed VCF/BCF and streams --- main.c | 6 +++++- vcfannotate.c | 2 +- vcfcall.c | 12 ++++++------ vcfconcat.c | 2 +- vcffilter.c | 2 +- vcfgtcheck.c | 4 ++-- vcfisec.c | 2 +- vcfmerge.c | 2 +- vcfnorm.c | 2 +- vcfquery.c | 2 +- vcfroh.c | 2 +- vcfview.c | 2 +- 12 files changed, 22 insertions(+), 18 deletions(-) diff --git a/main.c b/main.c index 2bd920ee2..b3f008867 100644 --- a/main.c +++ b/main.c @@ -146,7 +146,11 @@ static void usage(FILE *fp) if ( cmds[i].func && cmds[i].help[0]!='-' ) fprintf(fp, "\t%-15s %s\n", cmds[i].alias, cmds[i].help); i++; } - + fprintf(fp,"\n"); + fprintf(fp,"Notes: Most commands accept VCF, bgzipped VCF and BCF with filetype detected\n"); + fprintf(fp," automatically even when streaming from a pipe. Indexed VCF and BCF\n"); + fprintf(fp," will work in all situations. Un-indexed VCF and BCF and streams will\n"); + fprintf(fp," work in most, but not all situations.\n"); fprintf(fp,"\n"); } diff --git a/vcfannotate.c b/vcfannotate.c index 7a24855f5..83b7a4d43 100644 --- a/vcfannotate.c +++ b/vcfannotate.c @@ -732,7 +732,7 @@ static void usage(args_t *args) { fprintf(stderr, "\n"); fprintf(stderr, "About: Annotate and edit VCF/BCF files.\n"); - fprintf(stderr, "Usage: bcftools annotate [options] |||-\n"); + fprintf(stderr, "Usage: bcftools annotate [options] \n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a, --annotations VCF file or tabix-indexed file with annotations: CHR\\tPOS[\\tVALUE]+\n"); diff --git a/vcfcall.c b/vcfcall.c index 9d2dbde07..3b422172b 100644 --- a/vcfcall.c +++ b/vcfcall.c @@ -339,12 +339,12 @@ void parse_novel_rate(args_t *args, const char *str) static void usage(args_t *args) { fprintf(stderr, "\n"); - fprintf(stderr, "About: SNP/indel variant calling from VCF/BCF. To be used in conjunction with samtools mpileup.\n"); - fprintf(stderr, " This command replaces the former \"bcftools view\" caller. Some of the original\n"); - fprintf(stderr, " functionality has been temporarily lost in the process of transition to htslib,\n"); - fprintf(stderr, " but will be added back on popular demand. The original calling model can be\n"); - fprintf(stderr, " invoked with the -c option.\n"); - fprintf(stderr, "Usage: bcftools call [options] |||-\n"); + fprintf(stderr, "About: SNP/indel variant calling from VCF/BCF. To be used in conjunction with samtools mpileup.\n"); + fprintf(stderr, " This command replaces the former \"bcftools view\" caller. Some of the original\n"); + fprintf(stderr, " functionality has been temporarily lost in the process of transition to htslib,\n"); + fprintf(stderr, " but will be added back on popular demand. The original calling model can be\n"); + fprintf(stderr, " invoked with the -c option.\n"); + fprintf(stderr, "Usage: bcftools call [options] \n"); fprintf(stderr, "\n"); fprintf(stderr, "File format options:\n"); fprintf(stderr, " -O, --output-type output type: 'b' compressed BCF; 'u' uncompressed BCF; 'z' compressed VCF; 'v' uncompressed VCF [v]\n"); diff --git a/vcfconcat.c b/vcfconcat.c index 29c4bb9b5..2eb50708f 100644 --- a/vcfconcat.c +++ b/vcfconcat.c @@ -443,7 +443,7 @@ static void usage(args_t *args) fprintf(stderr, "About: Concatenate and/or combine overlapping VCF/BCF files split e.g. by chromosome\n"); fprintf(stderr, " or variant type. All source files must have the same sample columns appearing\n"); fprintf(stderr, " in the same order.\n"); - fprintf(stderr, "Usage: bcftools concat [options] || [|| ...]\n"); + fprintf(stderr, "Usage: bcftools concat [options] [ [...]]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a, --allow-overlaps Combine overlapping files. Requires indexed files.\n"); diff --git a/vcffilter.c b/vcffilter.c index 0066b4571..5f49e4b06 100644 --- a/vcffilter.c +++ b/vcffilter.c @@ -279,7 +279,7 @@ static void usage(args_t *args) { fprintf(stderr, "\n"); fprintf(stderr, "About: Apply fixed-threshold filters.\n"); - fprintf(stderr, "Usage: bcftools filter [options] |||-\n"); + fprintf(stderr, "Usage: bcftools filter [options] \n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -e, --exclude exclude sites for which the expression is true (e.g. '%%TYPE=\"snp\" && %%QUAL>=10 && (DP4[2]+DP4[3] > 2')\n"); diff --git a/vcfgtcheck.c b/vcfgtcheck.c index 053088a8e..4e02b11c0 100644 --- a/vcfgtcheck.c +++ b/vcfgtcheck.c @@ -652,8 +652,8 @@ static char *init_prefix(char *prefix) static void usage(void) { fprintf(stderr, "\n"); - fprintf(stderr, "About: Check sample identity. With no -g VCF given, multi-sample cross-check is performed.\n"); - fprintf(stderr, "Usage: bcftools gtcheck [options] [-g |] |\n"); + fprintf(stderr, "About: Check sample identity. With no -g BCF given, multi-sample cross-check is performed.\n"); + fprintf(stderr, "Usage: bcftools gtcheck [options] [-g ] \n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a, --all-sites output comparison for all sites\n"); diff --git a/vcfisec.c b/vcfisec.c index f629c89c0..222413031 100644 --- a/vcfisec.c +++ b/vcfisec.c @@ -301,7 +301,7 @@ static void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, "About: Create intersections, unions and complements of VCF files.\n"); - fprintf(stderr, "Usage: bcftools isec [options] | | [...]\n"); + fprintf(stderr, "Usage: bcftools isec [options] [...]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -c, --collapse treat as identical records with , see man page for details [none]\n"); diff --git a/vcfmerge.c b/vcfmerge.c index d97d79a41..96560546c 100644 --- a/vcfmerge.c +++ b/vcfmerge.c @@ -1688,7 +1688,7 @@ static void usage(void) fprintf(stderr, "\n"); fprintf(stderr, "About: Merge multiple VCF or BCF files to create one multi-sample file combining compatible records\n"); fprintf(stderr, " into one according to the -m option.\n"); - fprintf(stderr, "Usage: bcftools merge [options] | | [...]\n"); + fprintf(stderr, "Usage: bcftools merge [options] [...]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " --use-header use the provided header\n"); diff --git a/vcfnorm.c b/vcfnorm.c index ac777f7cc..7aa7635ff 100644 --- a/vcfnorm.c +++ b/vcfnorm.c @@ -508,7 +508,7 @@ static void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, "About: Left-align and normalize indels.\n"); - fprintf(stderr, "Usage: bcftools norm [options] -f |||-\n"); + fprintf(stderr, "Usage: bcftools norm [options] -f \n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -D, --remove-duplicates remove duplicate lines of the same type. [Todo: merge genotypes, don't just throw away.]\n"); diff --git a/vcfquery.c b/vcfquery.c index d8f9445e0..54eb64704 100644 --- a/vcfquery.c +++ b/vcfquery.c @@ -643,7 +643,7 @@ static void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, "About: Extracts fields from VCF/BCF file and prints them in user-defined format\n"); - fprintf(stderr, "Usage: bcftools query [options] |||- [| ...]\n"); + fprintf(stderr, "Usage: bcftools query [options] [ [...]]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a, --annots alias for -f '%%CHROM\\t%%POS\\t%%MASK\\t%%REF\\t%%ALT\\t%%TYPE\\t' + tab-separated of tags\n"); diff --git a/vcfroh.c b/vcfroh.c index a91c2c5c7..c058cbb90 100644 --- a/vcfroh.c +++ b/vcfroh.c @@ -721,7 +721,7 @@ static void usage(args_t *args) { fprintf(stderr, "\n"); fprintf(stderr, "About: HMM model for detecting runs of autozygosity.\n"); - fprintf(stderr, "Usage: bcftools roh [options] |||-\n"); + fprintf(stderr, "Usage: bcftools roh [options] \n"); fprintf(stderr, "\n"); fprintf(stderr, "General Options:\n"); fprintf(stderr, " -b, --biallelic-sites consider only bi-allelic sites\n"); diff --git a/vcfview.c b/vcfview.c index 338bf049c..be8642f95 100644 --- a/vcfview.c +++ b/vcfview.c @@ -339,7 +339,7 @@ static void usage(args_t *args) { fprintf(stderr, "\n"); fprintf(stderr, "About: VCF/BCF conversion, view, subset and filter VCF/BCF files.\n"); - fprintf(stderr, "Usage: bcftools view [options] |||- [region1 [...]]\n"); + fprintf(stderr, "Usage: bcftools view [options] [region1 [...]]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Output options:\n"); fprintf(stderr, " -G, --drop-genotypes drop individual genotype information (after subsetting if -s option set)\n");