ArraySplitter 1.7.0__py3-none-manylinux_2_39_x86_64.whl
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.
- arraysplitter-1.7.0.data/scripts/arraysplitter +0 -0
- arraysplitter-1.7.0.data/scripts/arraysplitter_edit_dist +0 -0
- arraysplitter-1.7.0.dist-info/METADATA +308 -0
- arraysplitter-1.7.0.dist-info/RECORD +6 -0
- arraysplitter-1.7.0.dist-info/WHEEL +4 -0
- arraysplitter-1.7.0.dist-info/licenses/LICENSE +21 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: arraysplitter
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Science/Research
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: MacOS
|
|
9
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Rust
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Summary: De Novo Decomposition of Satellite DNA Arrays into Monomers within Telomere-to-Telomere Assemblies
|
|
20
|
+
Keywords: bioinformatics,satellite-dna,centromere,tandem-repeats,genomics
|
|
21
|
+
Author-email: Aleksey Komissarov <ad3002@gmail.com>
|
|
22
|
+
License: MIT
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
25
|
+
Project-URL: Homepage, https://github.com/aglabx/ArraySplitter
|
|
26
|
+
Project-URL: Issues, https://github.com/aglabx/ArraySplitter/issues
|
|
27
|
+
Project-URL: Repository, https://github.com/aglabx/ArraySplitter
|
|
28
|
+
|
|
29
|
+
# ArraySplitter: De Novo Decomposition of Satellite DNA Arrays
|
|
30
|
+
|
|
31
|
+
Decomposes satellite DNA arrays into monomers within telomere-to-telomere (T2T) assemblies. Ideal for analyzing centromeric and pericentromeric regions on monomeric level.
|
|
32
|
+
|
|
33
|
+
**Status:** Production ready. Successfully handles arrays from kilobase to megabase scale.
|
|
34
|
+
|
|
35
|
+
**Key Features:**
|
|
36
|
+
- De novo monomer identification without prior knowledge
|
|
37
|
+
- Autocorrelation-based period detection for robust periodicity analysis
|
|
38
|
+
- Automatic orientation to canonical form (A>T, C>G)
|
|
39
|
+
- Deterministic output sorted by genomic coordinates
|
|
40
|
+
- Multi-threaded processing
|
|
41
|
+
|
|
42
|
+
**Performance:** CHM13v2.0 assembly (~1300 alpha satellite arrays) processes in ~3.5 minutes (16 threads)
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install arraysplitter
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or build from source:
|
|
51
|
+
```bash
|
|
52
|
+
cd src/rust/arraysplitter
|
|
53
|
+
cargo build --release
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Basic decomposition
|
|
60
|
+
arraysplitter -i arrays.fa -o output_prefix -t 16
|
|
61
|
+
|
|
62
|
+
# With predefined cut sequences
|
|
63
|
+
arraysplitter -i arrays.fa -o output_prefix -c ATG,CGCG -t 16
|
|
64
|
+
|
|
65
|
+
# Show version
|
|
66
|
+
arraysplitter --version
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Output Files
|
|
70
|
+
|
|
71
|
+
All output is **deterministically sorted by chromosome and genomic position** (chr1 → chr22 → chrX → chrY → chrM).
|
|
72
|
+
|
|
73
|
+
| File | Description |
|
|
74
|
+
|------|-------------|
|
|
75
|
+
| `.decomposed.fasta` | Monomers with orientation info in headers |
|
|
76
|
+
| `.hors.tsv` | HOR-level decomposition (16 columns) |
|
|
77
|
+
| `.monomers.tsv` | Base-level monomers from recursive decomposition (17 columns) |
|
|
78
|
+
| `.summary.tsv` | One-row-per-array summary with HOR and monomer statistics (23 columns) |
|
|
79
|
+
| `.lengths` | Fragment lengths for each array |
|
|
80
|
+
|
|
81
|
+
### Summary TSV Columns (`.summary.tsv`)
|
|
82
|
+
|
|
83
|
+
One row per array combining HOR-level and monomer-level statistics. Useful for overview analysis.
|
|
84
|
+
|
|
85
|
+
| Column | Description |
|
|
86
|
+
|--------|-------------|
|
|
87
|
+
| `array_id` | Array identifier (chr_start_end_len_period_type) |
|
|
88
|
+
| `array_length` | Total array length in bp |
|
|
89
|
+
| `orientation` | `fwd` or `rev` (reverse complemented to canonical) |
|
|
90
|
+
| `method` | Detection method used (`autocorr`, `classic`) |
|
|
91
|
+
| **HOR-level stats** | |
|
|
92
|
+
| `hor_period` | Detected HOR period in bp |
|
|
93
|
+
| `hor_autocorr` | Autocorrelation at HOR period |
|
|
94
|
+
| `hor_n_monomers` | Number of HOR-level monomers |
|
|
95
|
+
| `hor_mean_ed_tmpl` | Mean edit distance to HOR consensus |
|
|
96
|
+
| `hor_mean_ed_prev` | Mean edit distance between adjacent HORs |
|
|
97
|
+
| `hor_cv` | Coefficient of variation for HOR lengths |
|
|
98
|
+
| `hor_consensus` | Consensus sequence at HOR level |
|
|
99
|
+
| `hor_iupac` | IUPAC ambiguity codes (bases ≥20% frequency) |
|
|
100
|
+
| `hor_quality` | Per-position support (digit 0-9, 9=90-100%) |
|
|
101
|
+
| **Monomer-level stats** | |
|
|
102
|
+
| `mono_period` | Median base monomer period |
|
|
103
|
+
| `mono_autocorr` | Mean autocorrelation at monomer level |
|
|
104
|
+
| `mono_n_monomers` | Total number of base monomers |
|
|
105
|
+
| `mono_mean_ed_tmpl` | Mean edit distance to monomer consensus |
|
|
106
|
+
| `mono_mean_ed_prev` | Mean edit distance between adjacent monomers |
|
|
107
|
+
| `mono_cv` | Mean coefficient of variation |
|
|
108
|
+
| `mono_consensus` | Consensus sequence at monomer level |
|
|
109
|
+
| `mono_iupac` | IUPAC ambiguity codes |
|
|
110
|
+
| `mono_quality` | Per-position support |
|
|
111
|
+
| `cut_sequence` | Anchor k-mer used for splitting |
|
|
112
|
+
|
|
113
|
+
### HORs TSV Columns (`.hors.tsv`)
|
|
114
|
+
|
|
115
|
+
Contains the primary decomposition into HOR (Higher Order Repeat) monomers. Multiple rows per array.
|
|
116
|
+
|
|
117
|
+
**Row types** (in order):
|
|
118
|
+
1. `pred_array` - Array-level prediction/header row
|
|
119
|
+
2. `flank` - Terminal fragments <70% of period
|
|
120
|
+
3. `monomer` - Full HOR monomers (sorted by idx)
|
|
121
|
+
4. `array` - Summary statistics row
|
|
122
|
+
5. `consensus` - Consensus sequence row
|
|
123
|
+
|
|
124
|
+
| Column | Description |
|
|
125
|
+
|--------|-------------|
|
|
126
|
+
| `array_id` | Array identifier (chr_start_end_len_period_type) |
|
|
127
|
+
| `type` | `pred_array`, `monomer`, `flank`, `array`, `consensus` |
|
|
128
|
+
| `idx` | Monomer index within array (0-based) |
|
|
129
|
+
| `length` | Sequence length in bp |
|
|
130
|
+
| `source` | Detection method: `anchor`, `split_2x`, `split_3x`, `left_flank`, `right_flank` |
|
|
131
|
+
| `ed_tmpl` | Edit distance to consensus template |
|
|
132
|
+
| `ed_prev` | Edit distance to previous monomer |
|
|
133
|
+
| `ed_next` | Edit distance to next monomer |
|
|
134
|
+
| `period` | Detected repeat period in bp |
|
|
135
|
+
| `autocorr` | Autocorrelation value at detected period |
|
|
136
|
+
| `n_expected` | Expected count of monomers (array_len / period) |
|
|
137
|
+
| `ed_per_bp` | Normalized edit distance (ed / length) |
|
|
138
|
+
| `cv` | Coefficient of variation for lengths |
|
|
139
|
+
| `cut_sequence` | Anchor sequence used for splitting |
|
|
140
|
+
| `orientation` | `fwd` or `rev` (reverse complemented) |
|
|
141
|
+
| `sequence` | Actual DNA sequence (or `-` for pred_array/array rows) |
|
|
142
|
+
|
|
143
|
+
### Monomers TSV Columns (`.monomers.tsv`)
|
|
144
|
+
|
|
145
|
+
Contains base-level monomers after recursive HOR decomposition. **Unified format** matching `.hors.tsv` plus `parent_idx`.
|
|
146
|
+
|
|
147
|
+
Each HOR is recursively decomposed until:
|
|
148
|
+
- No further periodicity detected (autocorrelation ≤ 0.5)
|
|
149
|
+
- Minimum length (5bp) reached
|
|
150
|
+
|
|
151
|
+
**Row types** (in order):
|
|
152
|
+
1. `pred_array` - Array-level summary row
|
|
153
|
+
2. `base_monomer` - Base-level monomers from recursive decomposition
|
|
154
|
+
3. `monomer` - Non-decomposable monomers (e.g., telomeres)
|
|
155
|
+
|
|
156
|
+
| Column | Description |
|
|
157
|
+
|--------|-------------|
|
|
158
|
+
| `array_id` | Array identifier |
|
|
159
|
+
| `type` | `pred_array`, `base_monomer`, `monomer` |
|
|
160
|
+
| `idx` | Global index within array (0-based) |
|
|
161
|
+
| `length` | Sequence length in bp |
|
|
162
|
+
| `source` | `recursive_anchor`, `recursive_split`, `base`, `recursive_flank` |
|
|
163
|
+
| `ed_tmpl` | Edit distance to submonomer consensus |
|
|
164
|
+
| `ed_prev` | Edit distance to previous base monomer |
|
|
165
|
+
| `ed_next` | Edit distance to next base monomer |
|
|
166
|
+
| `period` | Detected period at this level (0 if base) |
|
|
167
|
+
| `autocorr` | Autocorrelation value |
|
|
168
|
+
| `n_expected` | Always 1 for individual monomers |
|
|
169
|
+
| `ed_per_bp` | Normalized edit distance |
|
|
170
|
+
| `cv` | Coefficient of variation within parent group |
|
|
171
|
+
| `cut_sequence` | Inherited anchor sequence |
|
|
172
|
+
| `orientation` | Inherited from array (`fwd`/`rev`) |
|
|
173
|
+
| `parent_idx` | Index of parent HOR from `.hors.tsv` |
|
|
174
|
+
| `sequence` | Actual DNA sequence |
|
|
175
|
+
|
|
176
|
+
### Example: α-satellite HOR Decomposition
|
|
177
|
+
|
|
178
|
+
For a typical α-satellite HOR (512bp → 3×171bp monomers):
|
|
179
|
+
|
|
180
|
+
**`.hors.tsv`** - 10 HOR monomers (~512bp each):
|
|
181
|
+
```
|
|
182
|
+
array_id type idx length period ...
|
|
183
|
+
chr1_centromere pred_array 10 5120 512 ...
|
|
184
|
+
chr1_centromere monomer 0 512 512 ...
|
|
185
|
+
chr1_centromere monomer 1 512 512 ...
|
|
186
|
+
...
|
|
187
|
+
chr1_centromere array 10 5120 512 ...
|
|
188
|
+
chr1_centromere consensus 10 512 512 ... [consensus seq]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**`.monomers.tsv`** - 30 base monomers (~171bp each):
|
|
192
|
+
```
|
|
193
|
+
array_id type idx length parent_idx ...
|
|
194
|
+
chr1_centromere pred_array 30 5120 - ...
|
|
195
|
+
chr1_centromere base_monomer 0 171 0 ...
|
|
196
|
+
chr1_centromere base_monomer 1 171 0 ...
|
|
197
|
+
chr1_centromere base_monomer 2 170 0 ...
|
|
198
|
+
chr1_centromere base_monomer 3 171 1 ...
|
|
199
|
+
...
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**`.summary.tsv`** - Single row with both levels:
|
|
203
|
+
```
|
|
204
|
+
array_id length hor_period hor_n_monomers mono_period mono_n_monomers ...
|
|
205
|
+
chr1_centromere 5120 512 10 171 30 ...
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Algorithm
|
|
209
|
+
|
|
210
|
+
ArraySplitter employs an autocorrelation-based algorithm for detecting repeat periods and decomposing satellite DNA arrays.
|
|
211
|
+
|
|
212
|
+
### 1. Canonical Orientation
|
|
213
|
+
|
|
214
|
+
Arrays are oriented to canonical form:
|
|
215
|
+
- Primary rule: A > T (more A's than T's)
|
|
216
|
+
- Secondary rule: C > G (if A=T)
|
|
217
|
+
- Non-canonical arrays are reverse complemented
|
|
218
|
+
|
|
219
|
+
### 2. Period Detection via Autocorrelation
|
|
220
|
+
|
|
221
|
+
The algorithm computes sequence autocorrelation to detect periodicity:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
autocorr(offset) = matches / comparisons
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Where `matches` counts identical nucleotides at positions `i` and `i + offset`.
|
|
228
|
+
|
|
229
|
+
**Key innovations:**
|
|
230
|
+
- **Random expectation correction:** Subtracts expected random match rate based on nucleotide composition
|
|
231
|
+
- **Refined period search:** Uses FFT-like peak detection to find true period vs harmonics
|
|
232
|
+
- **Confidence scoring:** Autocorrelation excess over random indicates detection confidence
|
|
233
|
+
|
|
234
|
+
### 3. Anchor Selection
|
|
235
|
+
|
|
236
|
+
For the detected period, finds optimal anchor (cut sequence) using:
|
|
237
|
+
|
|
238
|
+
1. **K-mer enumeration:** Extract all k-mers (k=10 by default) from the sequence
|
|
239
|
+
2. **Position analysis:** For each k-mer, record all occurrence positions
|
|
240
|
+
3. **Scoring metrics:**
|
|
241
|
+
- **Uniqueness:** Fraction of occurrences exactly `period` apart
|
|
242
|
+
- **Regularity:** How evenly spaced the occurrences are
|
|
243
|
+
4. **Combined score:** `uniqueness × regularity`
|
|
244
|
+
5. **Deterministic selection:** K-mers sorted lexicographically for reproducible tie-breaking
|
|
245
|
+
|
|
246
|
+
### 4. Array Decomposition
|
|
247
|
+
|
|
248
|
+
Using the selected anchor:
|
|
249
|
+
1. Split array at all anchor occurrences
|
|
250
|
+
2. First fragment → left flank (if < 70% of period)
|
|
251
|
+
3. Middle fragments → monomers
|
|
252
|
+
4. Last fragment → right flank (if < 70% of period)
|
|
253
|
+
5. Apply heuristics for multiplet splitting (doublets, triplets, etc.)
|
|
254
|
+
|
|
255
|
+
### 5. Output Generation
|
|
256
|
+
|
|
257
|
+
Results are:
|
|
258
|
+
- Sorted by chromosome (natural order: 1, 2, ..., 22, X, Y, M)
|
|
259
|
+
- Within chromosome, sorted by start position
|
|
260
|
+
- Fully deterministic across runs
|
|
261
|
+
|
|
262
|
+
## Methods
|
|
263
|
+
|
|
264
|
+
### `autocorr` (Default)
|
|
265
|
+
|
|
266
|
+
Uses autocorrelation for period detection. Best for:
|
|
267
|
+
- Regular tandem repeats
|
|
268
|
+
- Alpha satellite arrays
|
|
269
|
+
- HOR (Higher Order Repeat) structures
|
|
270
|
+
|
|
271
|
+
### `classic`
|
|
272
|
+
|
|
273
|
+
Uses frequency suffix tree approach. Better for:
|
|
274
|
+
- Irregular or degenerate repeats
|
|
275
|
+
- Very short arrays
|
|
276
|
+
- Arrays with high mutation rates
|
|
277
|
+
|
|
278
|
+
### `both`
|
|
279
|
+
|
|
280
|
+
Tries autocorrelation first, falls back to classic if autocorr fails.
|
|
281
|
+
|
|
282
|
+
## Command Line Options
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
arraysplitter --help
|
|
286
|
+
|
|
287
|
+
Options:
|
|
288
|
+
-i, --input <FILE> Input FASTA file
|
|
289
|
+
-o, --output <PREFIX> Output prefix
|
|
290
|
+
-t, --threads <N> Number of threads [default: all cores]
|
|
291
|
+
-c, --cuts <SEQ,SEQ> Predefined cut sequences (comma-separated)
|
|
292
|
+
-d, --depth <N> Max depth for cut search [default: 100]
|
|
293
|
+
--method <METHOD> Detection method: autocorr, classic, both [default: autocorr]
|
|
294
|
+
--max-ed-len <N> Max monomer length for edit distance [default: 10000]
|
|
295
|
+
--stats Print detailed statistics
|
|
296
|
+
--top-outliers <N> Number of outliers to show [default: 10]
|
|
297
|
+
-V, --version Print version
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Citation
|
|
301
|
+
|
|
302
|
+
If you use ArraySplitter in your research, please cite:
|
|
303
|
+
[Publication pending]
|
|
304
|
+
|
|
305
|
+
## Contact
|
|
306
|
+
|
|
307
|
+
For questions or support: ad3002@gmail.com
|
|
308
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
arraysplitter-1.7.0.data/scripts/arraysplitter,sha256=Zcu_UsQhngryLVGn045ZWwCUbLKzg1zwZl_lzHmnFbc,1595544
|
|
2
|
+
arraysplitter-1.7.0.data/scripts/arraysplitter_edit_dist,sha256=ID8c2mPudje-_GQQDj00ShygygwozF00qojTtGIIzN8,942232
|
|
3
|
+
arraysplitter-1.7.0.dist-info/METADATA,sha256=yXB-478164rhnZ_CfB1jkhtOJfU2IjAzUZXAE52CAo8,11657
|
|
4
|
+
arraysplitter-1.7.0.dist-info/WHEEL,sha256=S85EJ5pYjpCZc2RMdiklPrXzPJYd3s9DTziLlfYRpz4,106
|
|
5
|
+
arraysplitter-1.7.0.dist-info/licenses/LICENSE,sha256=m2dY1BxIk3gKB3jSa8kDtlSnNfW68VumXAQzGacCtvc,1063
|
|
6
|
+
arraysplitter-1.7.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 aglabx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|