XspecT 0.2.2__py3-none-any.whl → 0.2.4__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.2
3
+ Version: 0.2.4
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,7 +3,7 @@ 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=rFoHKBC9UANlZh3TccZAJbOZ6023BnQaGEoPjjJjW0A,3572
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
@@ -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.2.dist-info/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
26
- XspecT-0.2.2.dist-info/METADATA,sha256=iwBQ-BRc2bfZ3NNSNKbrLkC6hz5i6rAVjRRZBDjZiJ8,4826
27
- XspecT-0.2.2.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
28
- XspecT-0.2.2.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
29
- XspecT-0.2.2.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
30
- XspecT-0.2.2.dist-info/RECORD,,
25
+ XspecT-0.2.4.dist-info/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
26
+ XspecT-0.2.4.dist-info/METADATA,sha256=9r-Lr8K6r95a5aKgsEAs9j6TpKE5B0n-o7lthM_hiIc,4834
27
+ XspecT-0.2.4.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
28
+ XspecT-0.2.4.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
29
+ XspecT-0.2.4.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
30
+ XspecT-0.2.4.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
@@ -59,12 +60,16 @@ def classify(genus, path, meta, step):
59
60
 
60
61
  # define pipeline
61
62
  pipeline = Pipeline(genus + " classification", "Test Author", "test@example.com")
62
- species_execution = ModelExecution(genus + "-species", sparse_sampling_step=step)
63
+ species_execution = ModelExecution(
64
+ genus.lower() + "-species", sparse_sampling_step=step
65
+ )
63
66
  if meta:
64
67
  species_filtering_step = PipelineStep(
65
68
  StepType.FILTERING, genus, 0.7, species_execution
66
69
  )
67
- genus_execution = ModelExecution(genus + "-genus", sparse_sampling_step=step)
70
+ genus_execution = ModelExecution(
71
+ genus.lower() + "-genus", sparse_sampling_step=step
72
+ )
68
73
  genus_execution.add_pipeline_step(species_filtering_step)
69
74
  pipeline.add_pipeline_step(genus_execution)
70
75
  else:
@@ -73,7 +78,7 @@ def classify(genus, path, meta, step):
73
78
  for idx, file_path in enumerate(file_paths):
74
79
  run = pipeline.run(file_path)
75
80
  time_str = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
76
- 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"
77
82
  run.save(save_path)
78
83
  print(
79
84
  f"[{idx+1}/{len(file_paths)}] Run finished. Results saved to '{save_path}'."