xengsort 2.0.7__tar.gz → 2.0.8__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.
- {xengsort-2.0.7 → xengsort-2.0.8}/MANIFEST.in +1 -1
- {xengsort-2.0.7/xengsort.egg-info → xengsort-2.0.8}/PKG-INFO +3 -3
- {xengsort-2.0.7 → xengsort-2.0.8}/pyproject.toml +3 -3
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/hashio.py +15 -17
- xengsort-2.0.8/xengsort/xengsort/config/classify.yaml +60 -0
- xengsort-2.0.8/xengsort/xengsort/config/index.yaml +9 -0
- {xengsort-2.0.7 → xengsort-2.0.8/xengsort.egg-info}/PKG-INFO +3 -3
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort.egg-info/SOURCES.txt +3 -1
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort.egg-info/requires.txt +2 -2
- {xengsort-2.0.7 → xengsort-2.0.8}/LICENSE +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/README.md +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/setup.cfg +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/tests/test_trimmed_reads.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/cptasks_kmers.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/dnaencode.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/fastcash_info.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/fastcash_main.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/fastcash_optimize.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/hash_minimizer.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/hash_s3c_fbcbvb.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/hash_srh_fbcbvb.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/binaryio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/fastaio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/fastqio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/generalio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/seqio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/textio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/io/xorio.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/kmers.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/aligned_arrays.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/bitarray.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/conpro.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/debug.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/intbitarray.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/libc.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/llvm.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/numbautils.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/lowlevel/packedarray.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/mask.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/mathutils.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/parameters.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/srhash.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/subtable_hashfunctions.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/values/xenograft.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_classify.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_index.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_info.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_load.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_main.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_remove.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort/xengsort/xengsort_weak.py +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort.egg-info/dependency_links.txt +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort.egg-info/entry_points.txt +0 -0
- {xengsort-2.0.7 → xengsort-2.0.8}/xengsort.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xengsort
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: xenograft sorting of FASTQ reads into five categories: host, graft, both, neither, ambiguous.
|
|
5
5
|
Author-email: Jens Zentgraf <zentgraf@cs.uni-saarland.de>, Sven Rahmann <rahmann@cs.uni-saarland.de>
|
|
6
6
|
License: MIT License
|
|
@@ -38,8 +38,8 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
38
38
|
Requires-Python: >=3.12
|
|
39
39
|
Description-Content-Type: text/markdown
|
|
40
40
|
License-File: LICENSE
|
|
41
|
-
Requires-Dist: numpy
|
|
42
|
-
Requires-Dist: numba
|
|
41
|
+
Requires-Dist: numpy
|
|
42
|
+
Requires-Dist: numba
|
|
43
43
|
Requires-Dist: pytest
|
|
44
44
|
Requires-Dist: jsonargparse>=4.29.0
|
|
45
45
|
Requires-Dist: pip
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "xengsort"
|
|
8
|
-
version = "2.0.
|
|
8
|
+
version = "2.0.8"
|
|
9
9
|
|
|
10
10
|
license = {file = "LICENSE"}
|
|
11
11
|
|
|
@@ -21,8 +21,8 @@ readme = "README.md"
|
|
|
21
21
|
requires-python = ">=3.12"
|
|
22
22
|
|
|
23
23
|
dependencies = [
|
|
24
|
-
"numpy
|
|
25
|
-
"numba
|
|
24
|
+
"numpy",
|
|
25
|
+
"numba",
|
|
26
26
|
"pytest",
|
|
27
27
|
"jsonargparse>=4.29.0",
|
|
28
28
|
"pip",
|
|
@@ -126,14 +126,14 @@ def save_hash(outname, h, valueinfo, optinfo=dict(), appinfo=dict(), *, _pairs=_
|
|
|
126
126
|
outname = outname.rsplit(".", 1)[0]
|
|
127
127
|
timestamp0, timestamp1, timestamp2 = debug.timestamp
|
|
128
128
|
debugprint0, debugprint1, debugprint2 = debug.debugprint
|
|
129
|
-
startout = timestamp0(msg="\n## Output")
|
|
130
129
|
if outname.casefold() in ("/dev/null", "null", "none"):
|
|
131
130
|
debugprint0(f"- not writing special null output file '{outname}'")
|
|
132
131
|
return None
|
|
132
|
+
startout = timestamp0(msg="- saving hash table '{outname}'")
|
|
133
133
|
debugprint0(f"- writing output files '{outname}.hash', '{outname}.info'...")
|
|
134
134
|
hashinfo = {name: getattr(h, hname) for (name, hname) in _pairs}
|
|
135
135
|
obj = (hashinfo, valueinfo, optinfo, appinfo)
|
|
136
|
-
pickle.dumps(obj) # test
|
|
136
|
+
pickle.dumps(obj) # dummy dump to string: test if it works before writing huge array
|
|
137
137
|
checksum = write_array(f"{outname}.hash", h.hashtable)
|
|
138
138
|
hashinfo['checksum'] = checksum
|
|
139
139
|
with open(f"{outname}.info", "wb") as fout:
|
|
@@ -150,8 +150,10 @@ def load_hash(filename, *, shared_memory=False, info_only=False):
|
|
|
150
150
|
filename = filename.rsplit(".", 1)[0]
|
|
151
151
|
|
|
152
152
|
if not info_only:
|
|
153
|
-
startload = timestamp0(msg="
|
|
153
|
+
startload = timestamp0(msg=f"- loading hash table {filename}")
|
|
154
154
|
debugprint0(f"- hash files '{filename}.info', '{filename}.hash'...")
|
|
155
|
+
else:
|
|
156
|
+
debugprint1(f"- loading hash info '{filename}.info'")
|
|
155
157
|
|
|
156
158
|
with open(f"{filename}.info", "rb") as finfo:
|
|
157
159
|
infotup = pickle.load(finfo)
|
|
@@ -159,7 +161,7 @@ def load_hash(filename, *, shared_memory=False, info_only=False):
|
|
|
159
161
|
return None, None, infotup
|
|
160
162
|
(hashinfo, valueinfo, optinfo, appinfo) = infotup
|
|
161
163
|
|
|
162
|
-
debugprint1(f"-
|
|
164
|
+
debugprint1(f"- importing value set {valueinfo}.")
|
|
163
165
|
vmodule = import_module(f"..values.{valueinfo[0]}", __package__)
|
|
164
166
|
values = vmodule.initialize(*(valueinfo[1:]))
|
|
165
167
|
update_value = values.update
|
|
@@ -183,9 +185,9 @@ def load_hash(filename, *, shared_memory=False, info_only=False):
|
|
|
183
185
|
debugprint0("- WARNING: Converting hashfuncs from bytes to str")
|
|
184
186
|
checksum = hashinfo['checksum']
|
|
185
187
|
|
|
186
|
-
debugprint1(f"-
|
|
188
|
+
debugprint1(f"- hash functions: {hashfuncs}")
|
|
187
189
|
maxwalk = optinfo.get('maxwalk', -1)
|
|
188
|
-
debugprint1(f"-
|
|
190
|
+
debugprint1(f"- building hash table of type '{hashtype}'...")
|
|
189
191
|
m = import_module(f"..hash_{hashtype}", __package__)
|
|
190
192
|
|
|
191
193
|
init = True
|
|
@@ -197,26 +199,22 @@ def load_hash(filename, *, shared_memory=False, info_only=False):
|
|
|
197
199
|
shm_buf = shm.buf
|
|
198
200
|
assert shm_buf.shape[0] % 8 == 0
|
|
199
201
|
assert shm_buf.itemsize == 1
|
|
200
|
-
|
|
201
202
|
init = np.ndarray(shm_buf.shape[0] // 8, dtype=np.uint64, buffer=shm_buf)
|
|
202
|
-
|
|
203
203
|
h = m.build_hash(universe, n, subtables,
|
|
204
204
|
bucketsize, hashfuncs, nvalues, update_value,
|
|
205
205
|
aligned=aligned, nfingerprints=nfingerprints,
|
|
206
206
|
init=init, maxwalk=maxwalk, shortcutbits=shortcutbits, shm=shm)
|
|
207
|
-
|
|
208
207
|
if not shared_memory:
|
|
208
|
+
debugprint1(f"- loading into '{filename}.hash' into array")
|
|
209
209
|
checked = load_array_into(f"{filename}.hash", h.hashtable, check=checksum)
|
|
210
|
-
|
|
211
210
|
if checked:
|
|
212
|
-
debugprint2(f"-
|
|
213
|
-
else:
|
|
211
|
+
debugprint2(f"- checksum {checksum} successfully verified. Nice.")
|
|
212
|
+
else: # checksum for shared memory load
|
|
214
213
|
check = h.hashtable[:256].sum()
|
|
215
214
|
if check != checksum:
|
|
216
|
-
raise RuntimeError(f"- ERROR
|
|
215
|
+
raise RuntimeError(f"- ERROR loading into shared memory: {checksum=} does not match expected {check}")
|
|
217
216
|
else:
|
|
218
|
-
debugprint2(f"-
|
|
219
|
-
|
|
217
|
+
debugprint2(f"- checksum {checksum} successfully verified. Nice.")
|
|
220
218
|
timestamp0(startload, msg=f"- time to load '{filename}'")
|
|
221
219
|
return h, values, (hashinfo, valueinfo, optinfo, appinfo)
|
|
222
220
|
|
|
@@ -240,7 +238,7 @@ def compile_textdumper(h, f, nvalues, infotup):
|
|
|
240
238
|
nsubtables, nbuckets, bucketsize = h.subtables, h.nbuckets, h.bucketsize
|
|
241
239
|
universe, choices = h.universe, h.choices
|
|
242
240
|
bits = (bitsfor(universe), bitsfor(choices), bitsfor(nvalues))
|
|
243
|
-
debugprint1(f"-
|
|
241
|
+
debugprint1(f"- bits for (keys, choices, values): {bits}")
|
|
244
242
|
powbits = tuple(nextpow2(b) for b in bits)
|
|
245
243
|
NBK, NBC, NBV = [_nbytes[pb] for pb in powbits]
|
|
246
244
|
_keytype, _choicetype, _valuetype = [_nbdtypes[pb] for pb in powbits]
|
|
@@ -282,7 +280,7 @@ def compile_dumper(h, f, nvalues, infotup, packed):
|
|
|
282
280
|
nsubtables, nbuckets, bucketsize = h.subtables, h.nbuckets, h.bucketsize
|
|
283
281
|
universe, choices = h.universe, h.choices
|
|
284
282
|
bits = (bitsfor(universe), bitsfor(choices), bitsfor(nvalues))
|
|
285
|
-
debugprint1(f"-
|
|
283
|
+
debugprint1(f"- bits for (keys, choices, values): {bits}")
|
|
286
284
|
# define buffers
|
|
287
285
|
N = 2**14 # N: buffer size in items: 16K or 2**14
|
|
288
286
|
if packed:
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
threads: 8
|
|
2
|
+
prefetchlevel: 0
|
|
3
|
+
chunksize: 8.0
|
|
4
|
+
classification: count
|
|
5
|
+
params_count:
|
|
6
|
+
nothing: 0
|
|
7
|
+
few: 6
|
|
8
|
+
Ag: 3
|
|
9
|
+
Ah: 3
|
|
10
|
+
Mh_factor: 4
|
|
11
|
+
Mh_min: 3
|
|
12
|
+
Mg_factor: 4
|
|
13
|
+
Mg_min: 3
|
|
14
|
+
Mb_factor: 5
|
|
15
|
+
Mb_min: 3
|
|
16
|
+
Mn_factor: 4
|
|
17
|
+
Mn_min: 3
|
|
18
|
+
|
|
19
|
+
params_coverage:
|
|
20
|
+
min_size: 1 # k+minsize
|
|
21
|
+
weak_scale: "5/6" # 0.84 # 5/6
|
|
22
|
+
|
|
23
|
+
# at least T1_min host/graft, less than T1_max graft/host and at least T1_strong strong host/graft k-mers
|
|
24
|
+
T1_min: 0.25
|
|
25
|
+
T1_max: 0.01
|
|
26
|
+
T1_strong: 2
|
|
27
|
+
|
|
28
|
+
# More than T2 bases are covered by both
|
|
29
|
+
T2: 0.9
|
|
30
|
+
|
|
31
|
+
# More than T3 bases are covered by neither and the score_neither >= T3_score
|
|
32
|
+
T3: 0.9
|
|
33
|
+
T3_score: 0.5
|
|
34
|
+
|
|
35
|
+
# more than T4 host and graft -> ambiguous
|
|
36
|
+
T4: 0.26
|
|
37
|
+
|
|
38
|
+
# first >= T5 and gap >= T5_gap
|
|
39
|
+
# T5: 0.65
|
|
40
|
+
# T5_gap: 0.35
|
|
41
|
+
T5_both_h_g: 0.1
|
|
42
|
+
T5: 0.5
|
|
43
|
+
T5_gap: 0.25
|
|
44
|
+
T5_both_h_g: 0.1
|
|
45
|
+
|
|
46
|
+
# first is host/graft and second is atleast T6 both
|
|
47
|
+
# T6: 0.6
|
|
48
|
+
T6: 0.4
|
|
49
|
+
|
|
50
|
+
# first is both; second is not neither
|
|
51
|
+
# T7: 0.5
|
|
52
|
+
# T7_h_g: 0.21
|
|
53
|
+
T7: 0.3
|
|
54
|
+
T7_h_g: 0.1
|
|
55
|
+
|
|
56
|
+
# first neither
|
|
57
|
+
T8: 0.3
|
|
58
|
+
|
|
59
|
+
# T9_gap: 0.25
|
|
60
|
+
T9_gap: 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xengsort
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: xenograft sorting of FASTQ reads into five categories: host, graft, both, neither, ambiguous.
|
|
5
5
|
Author-email: Jens Zentgraf <zentgraf@cs.uni-saarland.de>, Sven Rahmann <rahmann@cs.uni-saarland.de>
|
|
6
6
|
License: MIT License
|
|
@@ -38,8 +38,8 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
38
38
|
Requires-Python: >=3.12
|
|
39
39
|
Description-Content-Type: text/markdown
|
|
40
40
|
License-File: LICENSE
|
|
41
|
-
Requires-Dist: numpy
|
|
42
|
-
Requires-Dist: numba
|
|
41
|
+
Requires-Dist: numpy
|
|
42
|
+
Requires-Dist: numba
|
|
43
43
|
Requires-Dist: pytest
|
|
44
44
|
Requires-Dist: jsonargparse>=4.29.0
|
|
45
45
|
Requires-Dist: pip
|
|
@@ -47,4 +47,6 @@ xengsort/xengsort/xengsort_info.py
|
|
|
47
47
|
xengsort/xengsort/xengsort_load.py
|
|
48
48
|
xengsort/xengsort/xengsort_main.py
|
|
49
49
|
xengsort/xengsort/xengsort_remove.py
|
|
50
|
-
xengsort/xengsort/xengsort_weak.py
|
|
50
|
+
xengsort/xengsort/xengsort_weak.py
|
|
51
|
+
xengsort/xengsort/config/classify.yaml
|
|
52
|
+
xengsort/xengsort/config/index.yaml
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|