Skip to content

Commit efc41ea

Browse files
committed
Update docs to reflect new v1.4 bcftools usage.
1 parent bfcc068 commit efc41ea

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,16 @@ Options:
7777
Usage: rhocall annotate [OPTIONS] VCF
7878
7979
Markup VCF file using rho-calls. Use BED file to mark all variants in AZ
80-
windows. Use a bcftools style roh TSV to mark only selected AZ variants.
80+
windows. Alternatively, use a bcftools v>=1.4 file with RG entries to mark
81+
all vars. With the --no-v14 flag, use an older bcftools v<=1.2 style roh
82+
TSV to mark only selected AZ variants. Roh is broken in bcftools v1.3 -
83+
do not use.
8184
8285
Options:
8386
-r FILENAME Bcftools roh style TSV file with
8487
CHR,POS,AZ,QUAL.
88+
--v14 / --no-v14 Bcftools v1.4 or newer roh file including RG
89+
calls.
8590
-b FILENAME BED file with AZ windows.
8691
-q, --quality_threshold FLOAT Minimum quality calls that are imported in
8792
region totals.
@@ -127,10 +132,13 @@ rhocall tally sample.roh -o sample.roh.tally.tsv
127132
```
128133
bcftools query -f'%CHROM\t%POS\t%REF,%ALT\t%INFO/AF\n' anon-SweGen_STR_NSPHS_1000samples_snp_freq_hg19.vcf.gz | bgzip -c > anon_SweGen_161019_snp_freq_hg19.tab.gz
129134
bcftools roh --AF-file anon_SweGen_161019_snp_freq_hg19.tab.gz -I 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.bcf > 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh
135+
# bcftools <=1.2
130136
rhocall tally 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh.tally.tsv
131-
rhocall annotate -r 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.bcf -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh.vcf
137+
rhocall annotate --no-v14 -r 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.bcf -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh.vcf
132138
rhocall aggregate 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh.bed
133139
rhocall annotate -b 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.roh.bed -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.rho.vcf 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.bcf
140+
# bcftools >=1.4
141+
rhocall annotate --v14 -r 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.14.roh -o 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.14.rho.vcf 2016-14676_sorted_md_rreal_brecal_gvcf_vrecal_comb_BOTH.bcf
134142
```
135143

136144
## Test files ##

rhocall/cli.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,13 @@ def aggregate(roh, quality_threshold, output, verbose):
168168
default=2
169169
)
170170
@click.option('--output','-o',type=click.File('w'), default='-')
171-
def annotate(vcf, roh, bed, v14, quality_threshold, flag_upd_at_fraction,output,verbose):
171+
def annotate(vcf, roh, bed, v14, quality_threshold, flag_upd_at_fraction,
172+
output, verbose):
172173
"""Markup VCF file using rho-calls. Use BED file to mark all variants in AZ
173-
windows. Use a bcftools style roh TSV to mark only selected AZ variants."""
174+
windows. Alternatively, use a bcftools v>=1.4 file with RG entries to mark
175+
all vars. With the --no-v14 flag, use an older bcftools v<=1.2 style roh TSV
176+
to mark only selected AZ variants. Roh is broken in bcftools v1.3
177+
- do not use."""
174178
loglevel = LEVELS.get(min(verbose, 3))
175179
configure_stream(level=loglevel)
176180

0 commit comments

Comments
 (0)