strkit 0.24.2__tar.gz → 0.25.0a2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {strkit-0.24.2/strkit.egg-info → strkit-0.25.0a2}/PKG-INFO +161 -43
  2. {strkit-0.24.2 → strkit-0.25.0a2}/README.md +157 -38
  3. {strkit-0.24.2 → strkit-0.25.0a2}/pyproject.toml +1 -1
  4. {strkit-0.24.2 → strkit-0.25.0a2}/setup.py +4 -5
  5. strkit-0.25.0a2/strkit/VERSION +1 -0
  6. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/align_matrix.py +14 -6
  7. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/allele.py +53 -59
  8. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/call_locus.py +385 -359
  9. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/call_sample.py +108 -106
  10. strkit-0.25.0a2/strkit/call/constants.py +9 -0
  11. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/gmm.py +12 -5
  12. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/loci.py +125 -64
  13. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/non_daemonic_pool.py +5 -4
  14. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/output/json_report.py +15 -4
  15. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/output/tsv.py +9 -9
  16. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/output/vcf.py +36 -20
  17. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/params.py +57 -16
  18. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/realign.py +30 -32
  19. strkit-0.25.0a2/strkit/call/repeat_count_params.py +10 -0
  20. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/repeats.py +6 -32
  21. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/snvs.py +25 -22
  22. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/types.py +5 -14
  23. strkit-0.25.0a2/strkit/call/utils.py +23 -0
  24. strkit-0.25.0a2/strkit/convert/_bed_4.py +11 -0
  25. strkit-0.25.0a2/strkit/convert/constants.py +16 -0
  26. strkit-0.25.0a2/strkit/convert/converter.py +102 -0
  27. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/convert/expansionhunter.py +3 -3
  28. strkit-0.25.0a2/strkit/convert/gangstr.py +11 -0
  29. strkit-0.25.0a2/strkit/convert/hipstr.py +11 -0
  30. strkit-0.25.0a2/strkit/convert/trf.py +64 -0
  31. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/convert/trgt.py +32 -11
  32. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/entry.py +84 -24
  33. strkit-0.25.0a2/strkit/viz/__init__.py +0 -0
  34. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/viz/server.py +2 -2
  35. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/viz/templates/browser.html +2 -2
  36. {strkit-0.24.2 → strkit-0.25.0a2/strkit.egg-info}/PKG-INFO +161 -43
  37. {strkit-0.24.2 → strkit-0.25.0a2}/strkit.egg-info/SOURCES.txt +4 -1
  38. {strkit-0.24.2 → strkit-0.25.0a2}/strkit.egg-info/requires.txt +3 -3
  39. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_caller_loci_fns.py +3 -3
  40. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_caller_utils.py +0 -10
  41. strkit-0.25.0a2/tests/test_convert.py +22 -0
  42. strkit-0.24.2/strkit/VERSION +0 -1
  43. strkit-0.24.2/strkit/call/__init__.py +0 -11
  44. strkit-0.24.2/strkit/call/cigar.py +0 -13
  45. strkit-0.24.2/strkit/call/utils.py +0 -24
  46. strkit-0.24.2/strkit/convert/_bed_4.py +0 -11
  47. strkit-0.24.2/strkit/convert/constants.py +0 -13
  48. strkit-0.24.2/strkit/convert/converter.py +0 -58
  49. strkit-0.24.2/strkit/convert/gangstr.py +0 -11
  50. strkit-0.24.2/strkit/convert/hipstr.py +0 -11
  51. {strkit-0.24.2 → strkit-0.25.0a2}/LICENSE +0 -0
  52. {strkit-0.24.2 → strkit-0.25.0a2}/MANIFEST.in +0 -0
  53. {strkit-0.24.2 → strkit-0.25.0a2}/setup.cfg +0 -0
  54. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/__init__.py +0 -0
  55. {strkit-0.24.2/strkit/catalog → strkit-0.25.0a2/strkit/call}/__init__.py +0 -0
  56. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/call/output/__init__.py +0 -0
  57. {strkit-0.24.2/strkit/convert → strkit-0.25.0a2/strkit/catalog}/__init__.py +0 -0
  58. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/catalog/combine.py +0 -0
  59. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/constants.py +0 -0
  60. {strkit-0.24.2/strkit/mi → strkit-0.25.0a2/strkit/convert}/__init__.py +0 -0
  61. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/data/ploidy_configs/diploid_autosomes.json +0 -0
  62. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/data/ploidy_configs/diploid_xx.json +0 -0
  63. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/data/ploidy_configs/diploid_xy.json +0 -0
  64. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/data/ploidy_configs/haploid.json +0 -0
  65. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/exceptions.py +0 -0
  66. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/iupac.py +0 -0
  67. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/json.py +0 -0
  68. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/logger.py +0 -0
  69. {strkit-0.24.2/strkit/viz → strkit-0.25.0a2/strkit/mi}/__init__.py +0 -0
  70. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/base.py +0 -0
  71. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/expansionhunter.py +0 -0
  72. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/gangstr.py +0 -0
  73. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/generic_vcf.py +0 -0
  74. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/intervals.py +0 -0
  75. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/repeathmm.py +0 -0
  76. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/result.py +0 -0
  77. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/straglr.py +0 -0
  78. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/strkit.py +0 -0
  79. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/tandem_genotypes.py +0 -0
  80. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/trgt.py +0 -0
  81. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/mi/vcf_utils.py +0 -0
  82. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/ploidy.py +0 -0
  83. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/utils.py +0 -0
  84. {strkit-0.24.2 → strkit-0.25.0a2}/strkit/viz/static/logo.png +0 -0
  85. {strkit-0.24.2 → strkit-0.25.0a2}/strkit.egg-info/dependency_links.txt +0 -0
  86. {strkit-0.24.2 → strkit-0.25.0a2}/strkit.egg-info/entry_points.txt +0 -0
  87. {strkit-0.24.2 → strkit-0.25.0a2}/strkit.egg-info/top_level.txt +0 -0
  88. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_iupac.py +0 -0
  89. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_mi_intervals.py +0 -0
  90. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_ploidy.py +0 -0
  91. {strkit-0.24.2 → strkit-0.25.0a2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strkit
3
- Version: 0.24.2
3
+ Version: 0.25.0a2
4
4
  Summary: A toolkit for analyzing variation in short(ish) tandem repeats.
5
5
  Home-page: https://github.com/davidlougheed/strkit
6
6
  Author: David Lougheed
@@ -11,7 +11,6 @@ Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Programming Language :: Python :: 3.13
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
14
  Classifier: Operating System :: POSIX
16
15
  Classifier: Operating System :: POSIX :: Linux
17
16
  Classifier: Operating System :: MacOS :: MacOS X
@@ -19,15 +18,15 @@ Requires-Python: ~=3.10
19
18
  Description-Content-Type: text/markdown
20
19
  License-File: LICENSE
21
20
  Requires-Dist: Flask<3.2,>=2.2.5
22
- Requires-Dist: orjson<4,>=3.9.15
21
+ Requires-Dist: orjson<4,>=3.11.1
23
22
  Requires-Dist: pysam<0.24,>=0.19
24
- Requires-Dist: numpy<1.27,>=1.23.4
23
+ Requires-Dist: numpy<3,>=2.1.3
25
24
  Requires-Dist: parasail<1.4,>=1.2.4
26
25
  Requires-Dist: pydantic<3,>=2.11.7
27
26
  Requires-Dist: scikit-learn<1.8,>=1.2.1
28
27
  Requires-Dist: scipy<1.17,>=1.10
29
28
  Requires-Dist: statsmodels<0.15,>=0.14.0
30
- Requires-Dist: strkit_rust_ext==0.24.2
29
+ Requires-Dist: strkit_rust_ext==0.26.0
31
30
  Dynamic: author
32
31
  Dynamic: author-email
33
32
  Dynamic: classifier
@@ -43,24 +42,34 @@ Dynamic: summary
43
42
  # STRkit - short tandem repeat genotyping with long reads
44
43
 
45
44
  [![PyPI version](https://badge.fury.io/py/strkit.svg)](https://badge.fury.io/py/strkit)
46
- [![BioRxiv DOI](https://img.shields.io/badge/bioRxiv-10.1101/2025.03.25.645269-B31B1B.svg)](https://doi.org/10.1101/2025.03.25.645269)
47
- [![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12689906.svg)](https://doi.org/10.5281/zenodo.12689906)
48
45
 
49
- STRkit is a short tandem repeat (STR) genotyping and analysis toolkit for long read sequencing data, especially
50
- PacBio HiFi data. The STRkit software package is written in Python and is available in the PyPI package registry or as
51
- a Docker container.
46
+ STRkit is a short tandem repeat (STR) genotyping and analysis toolkit for long read sequencing data (both HiFi and ONT).
47
+ The STRkit software package is written in Python and is available in the PyPI package registry or as a Docker container.
52
48
 
53
- If you use STRkit in published work, please cite our preprint:
49
+ STRkit's main advantages over other callers include:
50
+ * Better performance in some [benchmarking assessments](https://doi.org/10.1101/gr.280766.125) versus other tools;
51
+ * An on-the-fly SNV calling and local phasing step for unphased aligned reads;
52
+ * A license which allows use on any long-read sequencing data, versus TRGT whose
53
+ [license](https://github.com/PacificBiosciences/trgt/blob/main/LICENSE.md) restricts it to only PacBio data.
54
54
 
55
- > [STRkit: precise, read-level genotyping of short tandem repeats using long reads and single-nucleotide variation.](https://doi.org/10.1101/2025.03.25.645269)
56
- > David R Lougheed, Tomi Pastinen, Guillaume Bourque. *BioRxiv&nbsp;preprint*.
57
- > DOI:&nbsp;[10.1101/2025.03.25.645269](https://doi.org/10.1101/2025.03.25.645269)
55
+ Some other useful features include:
56
+ * An interactive [call visualizer](#strkit-visualize-call-visualizer)
57
+ * A locus catalog [converter](#strkit-convert-str-catalog-conversion), which includes a TRF `.dat` to `BED` converter
58
+ * A pre-built Docker image ([`ghcr.io/davidlougheed/strkit`](https://ghcr.io/davidlougheed/strkit))
59
+
60
+ If you use STRkit in published work, please cite our paper in *Genome Research*:
61
+
62
+ > [Read-level genotyping of short tandem repeats using long reads and single-nucleotide variation with STRkit.](https://doi.org/10.1101/gr.280766.125)
63
+ > David R Lougheed, Tomi Pastinen, Guillaume Bourque. *Genome Res*.
64
+ > DOI:&nbsp;[10.1101/gr.280766.125](https://doi.org/10.1101/gr.280766.125)
65
+
66
+ The code for the software itself is also available and citeable in Zenodo: https://doi.org/10.5281/zenodo.12689906
58
67
 
59
68
  <img src="./docs/images/strkit_logo_small.png" alt="" width="500" height="324" />
60
69
 
61
70
  **Officially-supported platforms:** macOS (aarch64), Linux (amd64/aarch64)
62
71
 
63
- > **Note:** Currently, it is unlikely that STRkit will work on "plain" Windows due to downstream dependencies.
72
+ > **Note:** Currently, it is unlikely that STRkit will work on "plain" Windows due to upstream dependencies.
64
73
  > To run STRkit on Windows, please use [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/) or
65
74
  > use our Docker image (see [Installation as a Docker container](#as-a-docker-container)).
66
75
 
@@ -97,7 +106,7 @@ with the following command:
97
106
  python -m pip install strkit
98
107
  ```
99
108
 
100
- You may need to install the [Rust toolchain](https://www.rust-lang.org/tools/install) (version 1.85.0 or newer)
109
+ You may need to install the [Rust toolchain](https://www.rust-lang.org/tools/install) (version 1.88.0 or newer)
101
110
  and a C compiler (e.g., `gcc`, `clang`), as well as `cmake`, to compile the `strkit_rust_ext` wheel,
102
111
  although prebuilt wheels for this module are available for some platforms. Compiling the wheel may take quite
103
112
  a long time (in the tens of minutes).
@@ -105,7 +114,7 @@ a long time (in the tens of minutes).
105
114
  On Digital Research Alliance of Canada/Compute Canada clusters, this involves loading a few modules:
106
115
 
107
116
  ```bash
108
- module load rust/1.85.0 clang/18.1.8 python/3.11 scipy-stack/2025a parasail/2.6.2
117
+ module load rust/1.91.0 clang/18.1.8 python/3.11 scipy-stack/2026a parasail/2.6.2
109
118
  python -m pip install strkit
110
119
  ```
111
120
 
@@ -141,7 +150,7 @@ docker run \
141
150
  -v out:/out \
142
151
  -it ghcr.io/davidlougheed/strkit call \
143
152
  /inputs/file.bam \
144
- --hq --loci /inputs/loci.bed --ref /inputs/ref.fa --incorporate-snvs /inputs/dbsnp.vcf.gz \
153
+ --loci /inputs/loci.bed --ref /inputs/ref.fa --incorporate-snvs /inputs/dbsnp.vcf.gz \
145
154
  --vcf /out/calls.vcf --no-tsv
146
155
  ```
147
156
 
@@ -179,13 +188,14 @@ long read data should still work.
179
188
  * Whole-genome and targeted genotyping modes to adjust this re-weighting.
180
189
  * Incorporation of single-nucleotide variation (SNVs) for better and faster calling plus
181
190
  additional downstream analysis possibilities.
182
- * Recommended for **HiFi data and ONT R10 data only**. In my testing, this worsens runtime and call quality for
183
- ONT ultra-long-read data, but speeds up the tool and improves call quality for HiFi/ONT R10 data.
191
+ * SNV incorporation is recommended for **HiFi data and ONT R10 data only**. In my testing, this worsens runtime and
192
+ call quality for ONT ultra-long-read data, but speeds up the tool and improves call quality for HiFi/ONT R10 data.
184
193
  * **Important note:** This functionality is best for whole-genome STR surveying. If hunting for rare / low-coverage
185
- expansions, or using targeted sequencing data, it may be best to **NOT USE** an SNV catalog to avoid discording
194
+ expansions, or using targeted sequencing data, it may be best to **NOT USE** an SNV catalog to avoid discarding
186
195
  reads with short flanking regions.
187
196
  * Parallelized for faster computing on clusters and for ad-hoc fast analysis of single samples.
188
197
  * 95% confidence intervals on calls via a user-configurable optional parametric bootstrapping process.
198
+ * Multiple motif support via [IUPAC code motifs](https://www.bioinformatics.org/sms/iupac.html).
189
199
 
190
200
 
191
201
  #### Usage:
@@ -198,16 +208,14 @@ See all parameters and example usage with a Slurm cluster:
198
208
  ```bash
199
209
  # For the dbSNP VCF used below for SNV incorporation, see https://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/
200
210
  # (00-common_all.vcf.gz)
201
- #
202
- # "Accurate reads" here means HiFi / ONT R10 duplex reads, but in practice may also include ONT R10 simplex reads.
203
211
 
204
212
  strkit call \
205
213
  path/to/read/file.bam \ # [REQUIRED] One indexed read file (BAM/CRAM)
206
- --hq \ # If using accurate reads, enable this to get better genotyping & more robust expansion detection
207
214
  --realign \ # If using accurate reads, enable this to enable local realignment / read recovery. Good for detecting expansions, but slows down calling.
208
215
  --ref path/to/reference.fa.gz \ # [REQUIRED] Indexed FASTA-formatted reference genome
209
216
  --loci path/to/loci.bed \ # [REQUIRED] TRF-formatted (or 4-col, with motif as last column) sorted list of loci to genotype
210
- --incorporate-snvs path/to/dbsnp/00-common_all.vcf.gz \ # If you want, specify a SNV catalogue to help phase STRs & speed up calling
217
+ --annotation-file path/to/reference-annotations.gff.gz \ # Optional GFF3/GTF file to provide locus annotations (transcript/exon ID)
218
+ --incorporate-snvs path/to/dbsnp/00-common_all.vcf.gz \ # If you want, specify a SNV catalogue to help phase STRs & speed up calling with HiFi/ONT R10
211
219
  --vcf my-calls.vcf \ # Calculate consensus sequences for alleles and output a .vcf (or .vcf.gz) with call data
212
220
  --seed 183 \ # Fixed random number generator seed for replicability
213
221
  --processes 10 \ # Number of parallel processes to use; DEFAULT: 1
@@ -222,15 +230,77 @@ PacBio provides a
222
230
  for CCS alignment in this scenario. However, regular aligned readsets are fine and have been tested
223
231
  extensively.
224
232
 
225
- If you're using accurate long reads (e.g., HiFi, ONT R10 duplex) as input, **use the `--hq` and
226
- `--realign` options** to get better genotype calculation and a greater proportion of reads
227
- incorporated into the computed genotypes, respectively. These should not add much performance
228
- overhead. *In practice, these options may also aid calling with slightly-less-accurate reads.*
233
+ ###### WITH ACCURATE READS
234
+
235
+ If you're using accurate long reads (e.g., HiFi, ONT R10) as input, **use the `--realign` option**
236
+ to enable re-aligning soft-clipped reads to the reference genome. This will add a bit of
237
+ performance overhead, but can help recover some reads of interest (e.g., expansions).
238
+
239
+ *In practice, this option may also aid calling with slightly-less-accurate reads, especially if
240
+ you are looking for expansions and do not mind slower performance if the reads do not align well
241
+ to the reference genome.*
242
+
243
+ ###### WITH LOW-QUALITY READS
244
+
245
+ If you're using low-quality long reads (e.g., older ONT data), some non-default parameters may help
246
+ get the best genotyping performance:
247
+
248
+ - Reads with tandem repeat + flanking region PHRED quality below 13 are filtered out by default.
249
+ You may wish to lower this to avoid discarding reads by setting `--min-avg-phred` to a lower
250
+ value like `5`, or you can effectively disable this filter by setting it to `1`.
251
+ - We have observed some cases of 'false positive' expansion-esque reads with ONT R9 data. The
252
+ `--force-gm-filter` option can help filter these out, at the cost of reducing STRkit's
253
+ sensitivity to true expansions.
254
+
255
+ ###### WITH HAPLOTAGGED READS
229
256
 
230
257
  If you want to **incorporate haplotagging from an alignment file (`HP` tags)** into the
231
258
  process, which should speed up runtime and potentially improve calling results, you must pass
232
259
  the `--use-hp` flag.
233
260
 
261
+ ###### WITH LOW-COVEREAGE ALIGNMENT DATA
262
+
263
+ If you're calling STRs using low-coverage alignments, you may want to:
264
+
265
+ - lower the minimum number of reads per locus (`--min-reads`) to `2` (or even `1` if you're fine
266
+ with some guaranteed allelic dropout), and
267
+ - lower the minimum number of reads per allele (`--min-allele-reads`) to `1` to avoid dropout as
268
+ much as possible.
269
+ - potentially, if you desire more calls at the cost of quality, lower the minimum tandem repeat +
270
+ flanking region PHRED quality required (from its default of 13) via the `--min-avg-phred`
271
+ parameter.
272
+ - enable the `--allow-only-one-full-flank` option to discard fewer reads by including spanning
273
+ reads where only one of the two flanking sequences on either side of the repeat are of full
274
+ length (i.e., are of length `--flank-size` or higher.)
275
+
276
+ **Note:** `--min-reads` must be greater than or equal to `--min-allele-reads`.
277
+
278
+ ###### WITH TARGETED SEQUENCING DATA
279
+
280
+ If you're running STRkit with targeted sequencing data, you should put STRkit in targeted mode with the `--targeted`
281
+ flag, which slightly tweaks read re-sampling behaviour and increases the `--max-reads` default from 250 to 500.
282
+
283
+ ##### LOOKING FOR LARGE EXPANSIONS
284
+
285
+ If you're running STRkit for the purpose of finding pathogenic STR expansions or expansions of
286
+ interest, the following parameters may help increase expansion sensitivity, at the cost of
287
+ computational performance or a potential bias towards heterozygous calls:
288
+
289
+ * With a catalog of disease loci, make sure to encode all possible locus motifs of the same length
290
+ via [IUPAC codes](https://www.bioinformatics.org/sms/iupac.html) in the catalog file.
291
+ * Make sure to **NOT** enable `--force-gm-filter`, even if using lower-quality reads. Enabling this
292
+ option can filter out artifact reads with false-positive expansion-like read counts, but it will
293
+ also lower sensitivity for true expansions with low read support.
294
+ * Enable `--realign`, *even* with lower-quality reads. Reads containing expansions can be
295
+ soft-clipped by aligners like `minimap2`; the `--realign` flag can help recover these reads.
296
+ * Tune `--gm-filter-expansion-ratio` to a slightly lower value, like `3.0`. This will keep larger
297
+ alleles with low read support if they are larger than `--gm-filter-expansion-ratio` times the
298
+ size of the smaller allele.
299
+ * Enable the `--allow-only-one-full-flank` option to discard fewer reads (especially since
300
+ expansions often do not have many spanning reads) by including spanning reads where only one of the
301
+ two flanking sequences on either side of the repeat are of full length (i.e., are of length
302
+ `--flank-size` or higher.)
303
+
234
304
  ##### REGARDING SNV INCORPORATION
235
305
 
236
306
  If you want to **incorporate SNV calling** into the process, which speeds up runtime and gives
@@ -241,6 +311,16 @@ The file for GRCh38 is called `00-common_all.vcf.gz` as of time of writing.
241
311
  **Note that this does not need to be an SNV call file for your sample, specifically**; just one
242
312
  which has positions, reference/alternate alleles, and the `ID` field populated.
243
313
 
314
+ ##### REGARDING ANNOTATION
315
+
316
+ If you would like to have the IDs of **genome features** (from a `.gff3` or `.gtf` file) which
317
+ overlap STR loci in your `strkit call` output (JSON or VCF), you can pass a sorted, Tabix-indexed
318
+ annotation file path to `strkit call` with the `--annotation-file <path>` flag (replacing `<path>`
319
+ with the path to the annotation file.) This could be used for downstream analysis to find STR
320
+ variants that overlap, for example, coding sequences or gene UTRs.
321
+
322
+ For more information, see also documentation on the [Output formats](./docs/output_formats.md).
323
+
244
324
  ##### REGARDING OUTPUT
245
325
 
246
326
  If you want to output a full call report, you can use the `--json output-file.json` argument to
@@ -332,6 +412,11 @@ To exit the tool, press `Ctrl-C` in your command line window as mentioned in
332
412
  the start-up instructions.
333
413
 
334
414
 
415
+ #### Further documentation on the STRkit web visualization tool:
416
+
417
+ * [Using `strkit visualize` remotely](./docs/remote_viz.md)
418
+
419
+
335
420
 
336
421
  ### `strkit mi`: Mendelian inheritance analysis
337
422
 
@@ -378,44 +463,77 @@ For other options and what they do, run `strkit mi` (with no other arguments) or
378
463
 
379
464
  ### `strkit convert`: STR catalog conversion
380
465
 
381
- STRkit takes as input a four-or-more-column BED file, structured like:
466
+ STRkit takes as input a four-or-more-column BED file, structured like one of the following:
382
467
 
383
468
  ```
384
- contig start end [0 or more extraneous columns] motif
469
+ contig start end [0 or more extraneous columns] NNN
470
+ contig start end [0 or more extraneous columns] ID=locus1;MOTIF=NNN
385
471
  ```
386
472
 
387
473
  Any extraneous columns are removed, (internally) leaving a four-column STR locus representation.
388
474
  Some other tools, e.g., [Straglr](https://github.com/bcgsc/straglr), also take a four-column STR
389
475
  BED as locus catalog input. However, other formats representing a catalog of STRs exist:
390
476
 
391
- * [Tandem Repeats Finder](https://github.com/Benson-Genomics-Lab/TRF) outputs a TSV/BED with a lot
392
- of information. This can be used as-is with STRkit, but it's safer for other tools to convert to
393
- a four-column BED format.
477
+ * [Tandem Repeats Finder](https://github.com/Benson-Genomics-Lab/TRF) outputs a `.dat` file with a lot
478
+ of information. Once converted to a BED file, this can be used as-is with STRkit, but
479
+ it's safer for other tools to convert to a four-column BED format.
480
+ See "[Converting TRF DAT files to BED](./docs/convert_trf_to_bed.md)" for more on how to do this.
481
+ * STRkit supports using [IUPAC codes] to specify motifs. Manual post-processing of TRF output would
482
+ be needed to do this.
394
483
  * [TRGT uses a custom repeat definition format](https://github.com/PacificBiosciences/trgt/blob/main/docs/repeat_files.md),
395
484
  which can specify more advanced STR structures.
485
+ * Some tools support multiple motifs (see, e.g.,
486
+ [STRchive catalogs of pathogenic loci](https://strchive.org/loci/#downloads)).
396
487
 
397
488
  #### Usage
398
489
 
399
- The `strkit convert` sub-command requires an input format (`trf` or `trgt`), an output format
400
- (many, see `strkit convert --help`), and an input file. Output is written to `stdout`.
490
+ The `strkit convert` sub-command requires an input format (`bed4`, `trf` or `trgt`), an output
491
+ format (many, see `strkit convert --help`), and an input file. Output is written to `stdout`.
492
+
493
+ If you want the output **sorted** (which many tools prefer or require), use the `--sort` flag.
401
494
 
402
495
  *Note:* Not all input/output format pairs have available converter functions; an error will be
403
496
  printed to `stderr` if one does not exist.
404
497
 
405
- For example, to convert from a TRF BED to a TRGT repeat definition BED file:
498
+ ##### TRF DAT file to TRF BED file (*UCSC-style*)
499
+
500
+ To convert from a TRF `.dat` file (as output by the TRF program) to a TRF BED file in the style of
501
+ the one obtainable from UCSC (e.g., for
502
+ [hg38](https://hgdownload.soe.ucsc.edu/goldenpath/hg38/bigZips/latest/)):
503
+
504
+ ```bash
505
+ strkit convert --in-format trf --out-format trf in_file.trf.dat > out_file.trf.bed
506
+ ```
507
+
508
+ ##### TRF DAT file to 4-column BED file
509
+
510
+ To convert from a TRF `.dat` file (as output by the TRF program) to a normal BED file:
511
+
512
+ ```bash
513
+ strkit convert --in-format trf --out-format bed4 in_file.trf.dat > out_file.bed
514
+ ```
515
+
516
+ ##### TRF BED to TRGT repeat definition file
517
+
518
+ To convert from a TRF BED to a TRGT repeat definition BED file:
406
519
 
407
520
  ```bash
408
521
  strkit convert --in-format trf --out-format trgt in_file.trf.bed > out_file.bed
409
522
  ```
410
523
 
411
- To attempt a conversion from a TRGT repeat definition file to a STRkit/four-column motif BED:
524
+ ##### TRGT repeat definition file to STRkit BED
525
+
526
+ To convert from a TRGT repeat definition file to a STRkit BED, including locus IDs if set:
412
527
 
413
528
  ```bash
414
- strkit convert --in-format trgt --out-format strkit in_file.trgt.bed > out_file.bed
529
+ strkit convert --in-format trgt --out-format strkit in_file.trgt.bed > out_file.strkit.bed
415
530
  ```
416
531
 
417
- Note that TRGT can represent STRs with complex structure that STRkit cannot, so some of these loci
418
- may not be converted (these will be logged to `stderr`).
532
+ Where possible, multiple motifs will be reconciled using [IUPAC codes](https://www.bioinformatics.org/sms/iupac.html),
533
+ which STRkit supports.
534
+
535
+ Note that TRGT can represent STRs with complex structure that STRkit cannot. In these cases, the first motif in the TRGT
536
+ locus definition will be used and a message will be logged to `stderr`.
419
537
 
420
538
 
421
539
  ## Copyright and License
@@ -424,8 +542,8 @@ may not be converted (these will be logged to `stderr`).
424
542
  created during graduate research by DL.
425
543
  * 2023+: (versions beyond `0.8.0a1`):
426
544
  * Portions &copy; DL and McGill University 2021-2023
427
- * Portions &copy; McGill University 2024-2025
428
- * Portions &copy; DL 2024-2025
545
+ * Portions &copy; McGill University 2024-2026
546
+ * Portions &copy; DL 2024-2026
429
547
 
430
548
 
431
549
  ### Notice