Skip to content

Commit

Permalink
Help File
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaspe committed Aug 28, 2024
1 parent 9dc8fde commit 6b37253
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 41 deletions.
62 changes: 21 additions & 41 deletions src/bcftools/bcftools_annotate/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,33 @@ argument_groups:
alternatives: -o
direction: output
type: file
description: Output file.
description: Output annotated file.
required: true

- name: Options
dexcription: |
For examples on how to use use bcftools annotate see http://samtools.github.io/bcftools/howtos/annotate.html
For examples on how to use use bcftools annotate see http://samtools.github.io/bcftools/howtos/annotate.html.
For more details on the options see https://samtools.github.io/bcftools/bcftools.html#annotate.
arguments:

- name: --annotations
alternatives: --a
type: file
description: |
Bgzip-compressed and tabix-indexed file with annotations.
The file can be VCF, BED, or a tab-delimited file with mandatory columns CHROM, POS (or, alternatively, FROM and TO),
optional columns REF and ALT, and arbitrary number of annotation columns.
BED files are expected to have the ".bed" or ".bed.gz" suffix (case-insensitive),
otherwise a tab-delimited file is assumed. Note that in case of tab-delimited file,
the coordinates POS, FROM and TO are one-based and inclusive. When REF and ALT are present,
only matching VCF records will be annotated. If the END coordinate is present in the annotation
file and given on command line as "-c ~INFO/END", then VCF records will be matched also by the
INFO/END coordinate. If ID is present in the annotation file and given as "-c ~ID", then VCF
records will be matched also by the ID column.
VCF file or tabix-indexed FILE with annotations: CHR\tPOS[\tVALUE]+ .
- name: --columns
alternatives: --c
type: string
description: |
Comma-separated list of columns or tags to carry over from the annotation file (see also -a, --annotations).
See https://samtools.github.io/bcftools/bcftools.html#annotate for more details.
List of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG.
See man page for details.
- name: --columns_file
alternatives: --C
type: file
description: |
Read the list of columns from a file (normally given via the -c, --columns option).
"-" to skip a column of the annotation file. One column name per row,
an additional space- or tab-separated field can be present to indicate the merge logic
(normally given via the -l, --merge-logic option). This is useful when many annotations are
added at once.
Read -c columns from FILE, one name per row, with optional --merge_logic TYPE: NAME[ TYPE].
- name: --exclude
alternatives: --e
Expand All @@ -87,11 +75,17 @@ argument_groups:
Note this can be an unsafe operation and can result in corrupted BCF files.
If this option is used, make sure to sanity check the result thoroughly.
- name: --header_line
alternatives: --H
type: string
description: |
Header line which should be appended to the VCF header, can be given multiple times.
- name: --header_lines
alternatives: --h
type: file
description: |
Lines to append to the VCF header, see also -c, --columns and -a, --annotations.
File with header lines to append to the VCF header.
For example:
##INFO=<ID=NUMERIC_TAG,Number=1,Type=Integer,Description="Example header line">
##INFO=<ID=STRING_TAG,Number=1,Type=String,Description="Yet another header line">
Expand All @@ -100,11 +94,7 @@ argument_groups:
alternatives: --I
type: string
description: |
Assign ID on the fly. The format is the same as in the query command (see below).
By default all existing IDs are replaced. If the format string is preceded by "+",
only missing IDs will be set.
For example, one can use:
bcftools annotate --set-id +'%CHROM\_%POS\_%REF\_%FIRST_ALT' file.vcf
Set ID column using a `bcftools query`-like expression, see man page for details.
- name: --include
alternatives: --i
Expand All @@ -117,7 +107,7 @@ argument_groups:
alternatives: --k
type: boolean_true
description: |
Collect stats for sites with ID separately (known vs novel).
Leave --include/--exclude sites unchanged instead of discarding them.
- name: --merge_logic
alternatives: --l
Expand Down Expand Up @@ -170,16 +160,15 @@ argument_groups:
alternatives: --r
type: string
description: |
Comma-separated list of regions, see also --regions_file.
Overlapping records are matched even when the starting coordinate is outside of the region,
unlike the -t/-T options where only the POS coordinate is checked.
Note that -r cannot be used in combination with --regions_file.
Restrict to comma-separated list of regions.
See man page for details.
- name: --regions_file
alternatives: --R
type: string
description: |
See https://samtools.github.io/bcftools/bcftools.html#common_options.
Restrict to regions listed in a file.
See man page for details.
- name: --regions_overlap
type: string
Expand Down Expand Up @@ -225,6 +214,7 @@ argument_groups:
- name: --threads
type: integer
description: |
Number of extra output compression threads.
See https://samtools.github.io/bcftools/bcftools.html#common_options.
- name: --remove
Expand All @@ -237,16 +227,6 @@ argument_groups:
To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER).
"INFO" can be abbreviated to "INF" and "FORMAT" to "FMT".
- name: --write_index
alternatives: --W
type: string
description: |
Automatically index the output file.
FMT is optional and can be one of "tbi" or "csi" depending on output file format.
resources:
- type: bash_script
path: script.sh
Expand Down
41 changes: 41 additions & 0 deletions src/bcftools/bcftools_annotate/help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
```
bcftools annotate -h
```

annotate: option requires an argument -- 'h'

About: Annotate and edit VCF/BCF files.
Usage: bcftools annotate [options] VCF

Options:
-a, --annotations FILE VCF file or tabix-indexed FILE with annotations: CHR\tPOS[\tVALUE]+
-c, --columns LIST List of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details
-C, --columns-file FILE Read -c columns from FILE, one name per row, with optional --merge-logic TYPE: NAME[ TYPE]
-e, --exclude EXPR Exclude sites for which the expression is true (see man page for details)
--force Continue despite parsing error (at your own risk!)
-H, --header-line STR Header line which should be appended to the VCF header, can be given multiple times
-h, --header-lines FILE Lines which should be appended to the VCF header
-I, --set-id [+]FORMAT Set ID column using a `bcftools query`-like expression, see man page for details
-i, --include EXPR Select sites for which the expression is true (see man page for details)
-k, --keep-sites Leave -i/-e sites unchanged instead of discarding them
-l, --merge-logic TAG:TYPE Merge logic for multiple overlapping regions (see man page for details), EXPERIMENTAL
-m, --mark-sites [+-]TAG Add INFO/TAG flag to sites which are ("+") or are not ("-") listed in the -a file
--min-overlap ANN:VCF Required overlap as a fraction of variant in the -a file (ANN), the VCF (:VCF), or reciprocal (ANN:VCF)
--no-version Do not append version and command line to the header
-o, --output FILE Write output to a file [standard output]
-O, --output-type u|b|v|z[0-9] u/b: un/compressed BCF, v/z: un/compressed VCF, 0-9: compression level [v]
--pair-logic STR Matching records by <snps|indels|both|all|some|exact>, see man page for details [some]
-r, --regions REGION Restrict to comma-separated list of regions
-R, --regions-file FILE Restrict to regions listed in FILE
--regions-overlap 0|1|2 Include if POS in the region (0), record overlaps (1), variant overlaps (2) [1]
--rename-annots FILE Rename annotations: TYPE/old\tnew, where TYPE is one of FILTER,INFO,FORMAT
--rename-chrs FILE Rename sequences according to the mapping: old\tnew
-s, --samples [^]LIST Comma separated list of samples to annotate (or exclude with "^" prefix)
-S, --samples-file [^]FILE File of samples to annotate (or exclude with "^" prefix)
--single-overlaps Keep memory low by avoiding complexities arising from handling multiple overlapping intervals
-x, --remove LIST List of annotations (e.g. ID,INFO/DP,FORMAT/DP,FILTER) to remove (or keep with "^" prefix). See man page for details
--threads INT Number of extra output compression threads [0]

Examples:
http://samtools.github.io/bcftools/howtos/annotate.html

0 comments on commit 6b37253

Please sign in to comment.