ArraySplitter 1.5.0__py3-none-macosx_11_0_arm64.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.
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: arraysplitter
|
|
3
|
+
Version: 1.5.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Science/Research
|
|
7
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
8
|
+
Classifier: Operating System :: MacOS
|
|
9
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
13
|
+
Summary: De novo decomposition of satellite DNA arrays into monomers (Rust implementation)
|
|
14
|
+
Keywords: bioinformatics,satellite-dna,centromere,tandem-repeats,genomics
|
|
15
|
+
Author-email: Aleksey Komissarov <ad3002@gmail.com>
|
|
16
|
+
License: BSD-3-Clause
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
19
|
+
Project-URL: Homepage, https://github.com/aglabx/ArraySplitter
|
|
20
|
+
Project-URL: Issues, https://github.com/aglabx/ArraySplitter/issues
|
|
21
|
+
Project-URL: Repository, https://github.com/aglabx/ArraySplitter
|
|
22
|
+
|
|
23
|
+
# ArraySplitter: De Novo Decomposition of Satellite DNA Arrays
|
|
24
|
+
|
|
25
|
+
Decomposes satellite DNA arrays into monomers within telomere-to-telomere (T2T) assemblies. Ideal for analyzing centromeric and pericentromeric regions on monomeric level.
|
|
26
|
+
|
|
27
|
+
**Status:** Production ready. Successfully handles arrays from kilobase to megabase scale.
|
|
28
|
+
|
|
29
|
+
**Key Features:**
|
|
30
|
+
- De novo monomer identification without prior knowledge
|
|
31
|
+
- Autocorrelation-based period detection for robust periodicity analysis
|
|
32
|
+
- Automatic orientation to canonical form (A>T, C>G)
|
|
33
|
+
- Deterministic output sorted by genomic coordinates
|
|
34
|
+
- Multi-threaded processing (16+ threads)
|
|
35
|
+
- Classification of arrays into repeat families
|
|
36
|
+
|
|
37
|
+
**Performance:**
|
|
38
|
+
- **Rust implementation:** CHM13v2.0 assembly (~1300 arrays) processes in **~3.5 minutes** (16 threads)
|
|
39
|
+
- **Python implementation:** Same dataset in ~3 hours (single-threaded)
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
### Rust Implementation (Recommended)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd src/rust/arraysplitter
|
|
47
|
+
cargo build --release
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Binary will be at `target/release/arraysplitter_rs`
|
|
51
|
+
|
|
52
|
+
### Python Implementation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install arraysplitter
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
### Rust CLI
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Basic decomposition (autocorrelation method, recommended)
|
|
64
|
+
arraysplitter_rs -i arrays.fa -o output_prefix -t 16
|
|
65
|
+
|
|
66
|
+
# With predefined cut sequences
|
|
67
|
+
arraysplitter_rs -i arrays.fa -o output_prefix -c ATG,CGCG -t 16
|
|
68
|
+
|
|
69
|
+
# Classic frequency-tree method
|
|
70
|
+
arraysplitter_rs -i arrays.fa -o output_prefix --method classic -t 16
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Python CLI
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Basic decomposition
|
|
77
|
+
arraysplitter split -i arrays.fa -o output_prefix
|
|
78
|
+
|
|
79
|
+
# Classify arrays into families
|
|
80
|
+
arraysplitter classify -i output_prefix.lengths -o classification
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Output Files
|
|
84
|
+
|
|
85
|
+
All output is **deterministically sorted by chromosome and genomic position** (chr1 → chr22 → chrX → chrY → chrM).
|
|
86
|
+
|
|
87
|
+
| File | Description |
|
|
88
|
+
|------|-------------|
|
|
89
|
+
| `.decomposed.fasta` | Monomers with orientation info in headers |
|
|
90
|
+
| `.monomers.tsv` | Detailed table with metrics per monomer |
|
|
91
|
+
| `.lengths` | Fragment lengths for each array |
|
|
92
|
+
| `.timings.tsv` | Processing time per array |
|
|
93
|
+
|
|
94
|
+
### TSV Columns
|
|
95
|
+
|
|
96
|
+
| Column | Description |
|
|
97
|
+
|--------|-------------|
|
|
98
|
+
| `array_id` | Array identifier (chr_start_end_len_period_type) |
|
|
99
|
+
| `type` | `pred_array`, `monomer`, `flank`, `array`, `consensus` |
|
|
100
|
+
| `idx` | Monomer index within array |
|
|
101
|
+
| `length` | Sequence length |
|
|
102
|
+
| `source` | Detection method (`anchor`, `split_2x`, etc.) |
|
|
103
|
+
| `ed_tmpl` | Edit distance to consensus template |
|
|
104
|
+
| `ed_prev` | Edit distance to previous monomer |
|
|
105
|
+
| `ed_next` | Edit distance to next monomer |
|
|
106
|
+
| `period` | Detected repeat period |
|
|
107
|
+
| `autocorr` | Autocorrelation value at period |
|
|
108
|
+
| `cut_sequence` | Anchor sequence used for splitting |
|
|
109
|
+
| `orientation` | `fwd` or `rev` (reverse complemented) |
|
|
110
|
+
| `sequence` | Actual DNA sequence |
|
|
111
|
+
|
|
112
|
+
## Algorithm
|
|
113
|
+
|
|
114
|
+
ArraySplitter employs an autocorrelation-based algorithm for detecting repeat periods and decomposing satellite DNA arrays.
|
|
115
|
+
|
|
116
|
+
### 1. Canonical Orientation
|
|
117
|
+
|
|
118
|
+
Arrays are oriented to canonical form:
|
|
119
|
+
- Primary rule: A > T (more A's than T's)
|
|
120
|
+
- Secondary rule: C > G (if A=T)
|
|
121
|
+
- Non-canonical arrays are reverse complemented
|
|
122
|
+
|
|
123
|
+
### 2. Period Detection via Autocorrelation
|
|
124
|
+
|
|
125
|
+
The algorithm computes sequence autocorrelation to detect periodicity:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
autocorr(offset) = matches / comparisons
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Where `matches` counts identical nucleotides at positions `i` and `i + offset`.
|
|
132
|
+
|
|
133
|
+
**Key innovations:**
|
|
134
|
+
- **Random expectation correction:** Subtracts expected random match rate based on nucleotide composition
|
|
135
|
+
- **Refined period search:** Uses FFT-like peak detection to find true period vs harmonics
|
|
136
|
+
- **Confidence scoring:** Autocorrelation excess over random indicates detection confidence
|
|
137
|
+
|
|
138
|
+
### 3. Anchor Selection
|
|
139
|
+
|
|
140
|
+
For the detected period, finds optimal anchor (cut sequence) using:
|
|
141
|
+
|
|
142
|
+
1. **K-mer enumeration:** Extract all k-mers (k=10 by default) from the sequence
|
|
143
|
+
2. **Position analysis:** For each k-mer, record all occurrence positions
|
|
144
|
+
3. **Scoring metrics:**
|
|
145
|
+
- **Uniqueness:** Fraction of occurrences exactly `period` apart
|
|
146
|
+
- **Regularity:** How evenly spaced the occurrences are
|
|
147
|
+
4. **Combined score:** `uniqueness × regularity`
|
|
148
|
+
5. **Deterministic selection:** K-mers sorted lexicographically for reproducible tie-breaking
|
|
149
|
+
|
|
150
|
+
### 4. Array Decomposition
|
|
151
|
+
|
|
152
|
+
Using the selected anchor:
|
|
153
|
+
1. Split array at all anchor occurrences
|
|
154
|
+
2. First fragment → left flank (if < 70% of period)
|
|
155
|
+
3. Middle fragments → monomers
|
|
156
|
+
4. Last fragment → right flank (if < 70% of period)
|
|
157
|
+
5. Apply heuristics for multiplet splitting (doublets, triplets, etc.)
|
|
158
|
+
|
|
159
|
+
### 5. Output Generation
|
|
160
|
+
|
|
161
|
+
Results are:
|
|
162
|
+
- Sorted by chromosome (natural order: 1, 2, ..., 22, X, Y, M)
|
|
163
|
+
- Within chromosome, sorted by start position
|
|
164
|
+
- Fully deterministic across runs
|
|
165
|
+
|
|
166
|
+
## Methods
|
|
167
|
+
|
|
168
|
+
### `autocorr` (Default)
|
|
169
|
+
|
|
170
|
+
Uses autocorrelation for period detection. Best for:
|
|
171
|
+
- Regular tandem repeats
|
|
172
|
+
- Alpha satellite arrays
|
|
173
|
+
- HOR (Higher Order Repeat) structures
|
|
174
|
+
|
|
175
|
+
### `classic`
|
|
176
|
+
|
|
177
|
+
Uses frequency suffix tree approach. Better for:
|
|
178
|
+
- Irregular or degenerate repeats
|
|
179
|
+
- Very short arrays
|
|
180
|
+
- Arrays with high mutation rates
|
|
181
|
+
|
|
182
|
+
### `both`
|
|
183
|
+
|
|
184
|
+
Tries autocorrelation first, falls back to classic if autocorr fails.
|
|
185
|
+
|
|
186
|
+
## Performance
|
|
187
|
+
|
|
188
|
+
| Dataset | Arrays | Rust (16 threads) | Python |
|
|
189
|
+
|---------|--------|-------------------|--------|
|
|
190
|
+
| CHM13v2.0 alpha satellite | ~1300 | 3.5 min | ~3 hours |
|
|
191
|
+
| Full CHM13v2.0 (>1kb) | ~13000 | ~35 min | ~30 hours |
|
|
192
|
+
|
|
193
|
+
Memory usage scales with array size. Typical: 500-600 MB for large datasets.
|
|
194
|
+
|
|
195
|
+
## Advanced Options
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
arraysplitter_rs --help
|
|
199
|
+
|
|
200
|
+
Options:
|
|
201
|
+
-i, --input <FILE> Input FASTA file
|
|
202
|
+
-o, --output <PREFIX> Output prefix
|
|
203
|
+
-t, --threads <N> Number of threads [default: all cores]
|
|
204
|
+
-c, --cuts <SEQ,SEQ> Predefined cut sequences (comma-separated)
|
|
205
|
+
-d, --depth <N> Max depth for cut search [default: 100]
|
|
206
|
+
--method <METHOD> Detection method: autocorr, classic, both [default: autocorr]
|
|
207
|
+
--max-ed-len <N> Max monomer length for edit distance [default: 10000]
|
|
208
|
+
--stats Print detailed statistics
|
|
209
|
+
--top-outliers <N> Number of outliers to show [default: 10]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Python Tools
|
|
213
|
+
|
|
214
|
+
### `arraysplitter classify`
|
|
215
|
+
|
|
216
|
+
Groups arrays into families based on cut sequences and patterns.
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
arraysplitter classify -i output.lengths -o families -s 0.9
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Output:**
|
|
223
|
+
- `.families.tsv` - Array assignments
|
|
224
|
+
- `.family_stats.tsv` - Per-family statistics
|
|
225
|
+
- `.family_summary.tsv` - Structural importance scores
|
|
226
|
+
|
|
227
|
+
### `arraysplitter rotate`
|
|
228
|
+
|
|
229
|
+
Rotates monomers to start with specific sequence.
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
arraysplitter rotate -i monomers.fa -o rotated.fa -s ATTCC
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### `arraysplitter extract`
|
|
236
|
+
|
|
237
|
+
Extracts unique monomers with frequencies.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
arraysplitter extract -i monomers.fa -o stats
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Complete Workflow
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Step 1: Decompose arrays (Rust, fast)
|
|
247
|
+
arraysplitter_rs -i centromere_arrays.fa -o centromere -t 16
|
|
248
|
+
|
|
249
|
+
# Step 2: Classify into families (Python)
|
|
250
|
+
arraysplitter classify -i centromere.lengths -o centromere_families
|
|
251
|
+
|
|
252
|
+
# Step 3: Extract unique monomers (optional)
|
|
253
|
+
arraysplitter extract -i centromere.decomposed.fasta -o centromere_monomers
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Citation
|
|
257
|
+
|
|
258
|
+
If you use ArraySplitter in your research, please cite:
|
|
259
|
+
[Publication pending]
|
|
260
|
+
|
|
261
|
+
## Contact
|
|
262
|
+
|
|
263
|
+
For questions or support: ad3002@gmail.com
|
|
264
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
arraysplitter-1.5.0.data/scripts/arraysplitter,sha256=00adkAFZ0BSeHxSDAdPheoAwnBi577RJ9bOUA6Lhk8k,1115536
|
|
2
|
+
arraysplitter-1.5.0.data/scripts/arraysplitter_edit_dist,sha256=G48cyurYgRj1ASUWKIXqY0-iVLzxGCoR2sN-EkvmU4s,717456
|
|
3
|
+
arraysplitter-1.5.0.dist-info/METADATA,sha256=iPFc3Mj6D-eaMeGeJaVrEgflp_QLO63uXK3v3Ei98vI,8235
|
|
4
|
+
arraysplitter-1.5.0.dist-info/WHEEL,sha256=yylKWcexKBlaNV_z8iGyahATbhal1pF7thA651eIJss,102
|
|
5
|
+
arraysplitter-1.5.0.dist-info/RECORD,,
|