XspecT 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.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.

Potentially problematic release.


This version of XspecT might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: XspecT
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Tool to monitor and characterize pathogens using Bloom filters.
5
5
  License: MIT License
6
6
 
@@ -60,7 +60,8 @@ Requires-Dist: pytest-cov ; extra == 'test'
60
60
  [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
61
61
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
62
62
 
63
- <img src="/src/docs/img/logo.png" height="50%" width="50%">
63
+ <img src="/docs/img/logo.png" height="50%" width="50%">
64
+
64
65
  <!-- start intro -->
65
66
  XspecT is a Python-based tool to taxonomically classify sequence-reads (or assembled genomes) on the species and/or sub-type level using [Bloom Filters] and a [Support Vector Machine]. It also identifies existing [blaOxa-genes] and provides a list of relevant research papers for further information.
66
67
  <br/><br/>
@@ -84,7 +85,7 @@ To install Xspect, please download the lastest 64 bit Python version and install
84
85
  ```
85
86
  pip install xspect
86
87
  ```
87
- Please note that Apple Silicon is currently not supported.
88
+ Please note that Windows and Alpine Linux is currently not supported.
88
89
 
89
90
  ## Usage
90
91
  ### Get the Bloomfilters
@@ -3,14 +3,14 @@ xspect/definitions.py,sha256=gg6NvT8ypNzlnJvMMo3nHsyh8DHFFu41lOfnILkRDpE,1215
3
3
  xspect/download_filters.py,sha256=ByE7Oggx-AyJ02Wirk_wcJHNdRDrJMfjwhmUe5tgWbE,741
4
4
  xspect/fastapi.py,sha256=C8pBBiqM6UdedLZgzfL_YYRuy98aPj8dcw_CLFrtMMc,3260
5
5
  xspect/file_io.py,sha256=zKhl6Fd9KZAYiD8YgIyje5TbDYk5lxMp1WUrNkGSBo8,2779
6
- xspect/main.py,sha256=EjtgwipOLH8rnJ79pWRAjDVx8FUtinYJy7jd_eYr_wQ,3624
6
+ xspect/main.py,sha256=eOA9PAeq3VvPWWoOZxXFErvPNW-ANzOxqMsbQJPCvDw,3651
7
7
  xspect/model_management.py,sha256=w0aqjLUoixCokyKTYrcN1vih5IoLYLJG9p8aeYdVc8Y,3560
8
8
  xspect/pipeline.py,sha256=h7duhVZ-hupwO_KQPstzFo8KMfMI2yleb9HmtTiMjic,7219
9
9
  xspect/run.py,sha256=OJ7pCFqva3AhIYklKjVnqWGooVRO7S3b56kIAy-xabY,1189
10
10
  xspect/train.py,sha256=khC1lldqfr4NvzLUiSJjSlh7DBG1ePielvQMiB29Hl8,10399
11
11
  xspect/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  xspect/models/probabilistic_filter_model.py,sha256=ImyNRzR7jf2CBPGI65ItG0_eYmrQjo9soQYlsM0r-P0,9829
13
- xspect/models/probabilistic_filter_svm_model.py,sha256=9Q4SBAzgbqATpS2E3IoardPpBwqkyrYSnrMwh0zwSag,5420
13
+ xspect/models/probabilistic_filter_svm_model.py,sha256=Z_aAigE_fC_gm80hRfxvROHGs6LuBqZnATHPpAkQGQE,5466
14
14
  xspect/models/probabilistic_single_filter_model.py,sha256=nDAd_-_Ci2eH0KOJtf4wA-w63FMq9rGSR1LGiIA-gdw,3884
15
15
  xspect/models/result.py,sha256=vHUEFXvbFyB8WmasXp99IrztjwaxH1f9QMFiRUPe40Q,4824
16
16
  xspect/train_filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,9 +22,9 @@ xspect/train_filter/ncbi_api/download_assemblies.py,sha256=MB_mxSjCTL05DqIt1WQem
22
22
  xspect/train_filter/ncbi_api/ncbi_assembly_metadata.py,sha256=puzDIws-yyBAEHwSAIYUM7g8FpLFmvOKh5xH1EsY8ZE,3830
23
23
  xspect/train_filter/ncbi_api/ncbi_children_tree.py,sha256=_8puOsnsKp5lsMV2gZY1ijkfD_BZKG9eXZCX09qph5E,1819
24
24
  xspect/train_filter/ncbi_api/ncbi_taxon_metadata.py,sha256=O6JDXC4E6AYaf7NPnb34eSJyZhMB8r--bjoVF_ZsEdA,1868
25
- XspecT-0.2.3.dist-info/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
26
- XspecT-0.2.3.dist-info/METADATA,sha256=6z-4ftDDKIA48kGcXB3HJoELmdM4X0f9uYCk0p5jHGU,4826
27
- XspecT-0.2.3.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
28
- XspecT-0.2.3.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
29
- XspecT-0.2.3.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
30
- XspecT-0.2.3.dist-info/RECORD,,
25
+ XspecT-0.2.5.dist-info/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
26
+ XspecT-0.2.5.dist-info/METADATA,sha256=NDw2i1MawAjAkybDXzaQfIIGFI4sw86MSlQJ8z6vkWs,4834
27
+ XspecT-0.2.5.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
28
+ XspecT-0.2.5.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
29
+ XspecT-0.2.5.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
30
+ XspecT-0.2.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.1)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
xspect/main.py CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  from pathlib import Path
4
4
  import datetime
5
+ import uuid
5
6
  import click
6
7
  import uvicorn
7
8
  from xspect import fastapi
@@ -77,7 +78,7 @@ def classify(genus, path, meta, step):
77
78
  for idx, file_path in enumerate(file_paths):
78
79
  run = pipeline.run(file_path)
79
80
  time_str = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
80
- save_path = get_xspect_runs_path() / f"run_{time_str}.json"
81
+ save_path = get_xspect_runs_path() / f"run_{time_str}_{uuid.uuid4()}.json"
81
82
  run.save(save_path)
82
83
  print(
83
84
  f"[{idx+1}/{len(file_paths)}] Run finished. Results saved to '{save_path}'."
@@ -107,7 +107,7 @@ class ProbabilisticFilterSVMModel(ProbabilisticFilterModel):
107
107
  ),
108
108
  filter_ids: list[str] = None,
109
109
  step: int = 1,
110
- ) -> dict:
110
+ ) -> ModelResult:
111
111
  """Predict the labels of the sequences"""
112
112
  # get scores and format them for the SVM
113
113
  res = super().predict(sequence_input, filter_ids, step=step)
@@ -119,6 +119,7 @@ class ProbabilisticFilterSVMModel(ProbabilisticFilterModel):
119
119
  self.slug(),
120
120
  res.hits,
121
121
  res.num_kmers,
122
+ sparse_sampling_step=step,
122
123
  prediction=str(svm.predict(svm_scores)[0]),
123
124
  )
124
125