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