XspecT 0.5.3__py3-none-any.whl → 0.6.0__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.
- xspect/classify.py +38 -8
- xspect/definitions.py +30 -10
- xspect/file_io.py +2 -1
- xspect/filter_sequences.py +20 -4
- xspect/main.py +126 -28
- xspect/misclassification_detection/__init__.py +0 -0
- xspect/misclassification_detection/mapping.py +168 -0
- xspect/misclassification_detection/point_pattern_analysis.py +102 -0
- xspect/misclassification_detection/simulate_reads.py +55 -0
- xspect/mlst_feature/mlst_helper.py +15 -19
- xspect/mlst_feature/pub_mlst_handler.py +16 -19
- xspect/model_management.py +14 -17
- xspect/models/probabilistic_filter_mlst_model.py +11 -10
- xspect/models/probabilistic_filter_model.py +142 -8
- xspect/models/probabilistic_filter_svm_model.py +29 -14
- xspect/models/probabilistic_single_filter_model.py +9 -7
- xspect/models/result.py +22 -15
- xspect/ncbi.py +82 -7
- xspect/train.py +21 -4
- xspect/web.py +13 -4
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/METADATA +4 -1
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/RECORD +26 -22
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/WHEEL +0 -0
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/entry_points.txt +0 -0
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {xspect-0.5.3.dist-info → xspect-0.6.0.dist-info}/top_level.txt +0 -0
xspect/web.py
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"""FastAPI-based web application for XspecT."""
|
|
2
2
|
|
|
3
|
+
# pylint: disable=too-many-arguments,too-many-positional-arguments
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
from uuid import uuid4
|
|
4
7
|
import json
|
|
5
8
|
from shutil import copyfileobj
|
|
6
9
|
import importlib.resources as pkg_resources
|
|
7
|
-
from fastapi import
|
|
10
|
+
from fastapi import (
|
|
11
|
+
APIRouter,
|
|
12
|
+
BackgroundTasks,
|
|
13
|
+
FastAPI,
|
|
14
|
+
HTTPException,
|
|
15
|
+
UploadFile,
|
|
16
|
+
)
|
|
8
17
|
from fastapi.responses import FileResponse, RedirectResponse
|
|
18
|
+
from fastapi.staticfiles import StaticFiles
|
|
9
19
|
from xspect.definitions import get_xspect_runs_path, get_xspect_upload_path
|
|
10
20
|
from xspect.download_models import download_test_models
|
|
11
21
|
import xspect.model_management as mm
|
|
12
22
|
from xspect.train import train_from_ncbi
|
|
13
23
|
from xspect import classify, filter_sequences
|
|
14
|
-
from fastapi.staticfiles import StaticFiles
|
|
15
24
|
|
|
16
25
|
app = FastAPI()
|
|
17
26
|
app.mount(
|
|
@@ -72,7 +81,7 @@ def classify_post(
|
|
|
72
81
|
)
|
|
73
82
|
return {"message": "Classification started.", "uuid": uuid}
|
|
74
83
|
|
|
75
|
-
|
|
84
|
+
if classification_type == "Species":
|
|
76
85
|
background_tasks.add_task(
|
|
77
86
|
classify.classify_species,
|
|
78
87
|
model,
|
|
@@ -119,7 +128,7 @@ def filter_post(
|
|
|
119
128
|
)
|
|
120
129
|
return {"message": "Genus filtering started.", "uuid": uuid}
|
|
121
130
|
|
|
122
|
-
|
|
131
|
+
if filter_type == "Species":
|
|
123
132
|
if not filter_species:
|
|
124
133
|
raise ValueError("filter_species must be provided for species filtering.")
|
|
125
134
|
background_tasks.add_task(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: XspecT
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Tool to monitor and characterize pathogens using Bloom filters.
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -45,6 +45,9 @@ Requires-Dist: xxhash
|
|
|
45
45
|
Requires-Dist: fastapi
|
|
46
46
|
Requires-Dist: uvicorn
|
|
47
47
|
Requires-Dist: python-multipart
|
|
48
|
+
Requires-Dist: mappy
|
|
49
|
+
Requires-Dist: pysam
|
|
50
|
+
Requires-Dist: numpy
|
|
48
51
|
Provides-Extra: docs
|
|
49
52
|
Requires-Dist: mkdocs-material; extra == "docs"
|
|
50
53
|
Requires-Dist: mkdocs-include-markdown-plugin; extra == "docs"
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
xspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
xspect/classify.py,sha256=
|
|
3
|
-
xspect/definitions.py,sha256=
|
|
2
|
+
xspect/classify.py,sha256=fpXk8KobN9QQGSWu5pPR9g65bGxlOmcYEwZ5FJ5KSdM,4106
|
|
3
|
+
xspect/definitions.py,sha256=eP2ttvoW9izCfMYqjLL6Y2oead44l74oHFKRDssTIF8,3506
|
|
4
4
|
xspect/download_models.py,sha256=VALcnowzkUpR-OAvgB5BUdEq9WnyNbli0CxH3OT40Rc,1121
|
|
5
|
-
xspect/file_io.py,sha256=
|
|
6
|
-
xspect/filter_sequences.py,sha256=
|
|
7
|
-
xspect/main.py,sha256=
|
|
8
|
-
xspect/model_management.py,sha256=
|
|
9
|
-
xspect/ncbi.py,sha256=
|
|
10
|
-
xspect/train.py,sha256=
|
|
11
|
-
xspect/web.py,sha256=
|
|
5
|
+
xspect/file_io.py,sha256=QX2nBtlLAexBdfUr7rtHLlWOuXiaKvfRdpn1Dn0avnY,8120
|
|
6
|
+
xspect/filter_sequences.py,sha256=QKjgUCk3RBY3U9hHmyvSQeQt8n1voBna-NjOoTqdp3A,5196
|
|
7
|
+
xspect/main.py,sha256=dhJa6mUneSI0nkwCWHqHrk9sZJgP0MkaPTSceSq1s4c,15463
|
|
8
|
+
xspect/model_management.py,sha256=yWbCk6tUn7-OYpzH0BViX2oWr4cdNkEBjrvnaw5GPdQ,4893
|
|
9
|
+
xspect/ncbi.py,sha256=RIwSJcPDREvk_YTNPfT34hQ4mb9nRKoXeNAS8wnLrHY,14413
|
|
10
|
+
xspect/train.py,sha256=VQ5pISDtp0rlGwrYqK_4_OH9CE6n7L1DNZ3txeTty6M,12574
|
|
11
|
+
xspect/web.py,sha256=kM4BZ3fA0f731EEXScAaiGrJZvjjfep1iC1iZemfazw,7039
|
|
12
|
+
xspect/misclassification_detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
xspect/misclassification_detection/mapping.py,sha256=xSibBi7-NoR74jakoYBmTW4Gy5FMfRDVF8H3ef5pElI,6698
|
|
14
|
+
xspect/misclassification_detection/point_pattern_analysis.py,sha256=5ivksPAh0zGMVI33ETPrZ01tPE86ELOwI7-XpJNYsQA,3820
|
|
15
|
+
xspect/misclassification_detection/simulate_reads.py,sha256=fxfKNSAwDT7Vnuh-_vgrMTLrfKihocZPU0gokNicey0,2009
|
|
12
16
|
xspect/mlst_feature/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
xspect/mlst_feature/mlst_helper.py,sha256=
|
|
14
|
-
xspect/mlst_feature/pub_mlst_handler.py,sha256=
|
|
17
|
+
xspect/mlst_feature/mlst_helper.py,sha256=pxRX_nRbrTSIFPf_FDV3dxR_FonmGtxttFgqNS7sIxE,8130
|
|
18
|
+
xspect/mlst_feature/pub_mlst_handler.py,sha256=gX0bgAqXTaW9weWgxcbsiD7UtMGuDD9veE9mj42Ffm8,7685
|
|
15
19
|
xspect/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
xspect/models/probabilistic_filter_mlst_model.py,sha256=
|
|
17
|
-
xspect/models/probabilistic_filter_model.py,sha256=
|
|
18
|
-
xspect/models/probabilistic_filter_svm_model.py,sha256=
|
|
19
|
-
xspect/models/probabilistic_single_filter_model.py,sha256=
|
|
20
|
-
xspect/models/result.py,sha256=
|
|
20
|
+
xspect/models/probabilistic_filter_mlst_model.py,sha256=w9ibUkAYA-DSOEkU8fBenlENrs8JwRRLaF5KO1HVKoM,17716
|
|
21
|
+
xspect/models/probabilistic_filter_model.py,sha256=9CyNG-wcvjz1AORzr2hCO_laerYfen1OmWKbRh02nc8,23777
|
|
22
|
+
xspect/models/probabilistic_filter_svm_model.py,sha256=WRXrAWr6f35B4VxgIhhLi1uj8RUZQAAhivjQdePsWhs,11094
|
|
23
|
+
xspect/models/probabilistic_single_filter_model.py,sha256=vJvKZrAybYHq_UdKQ2GvvVwgTYwqRrL-nDDQZxb6RRc,6828
|
|
24
|
+
xspect/models/result.py,sha256=v1wslD4RHgoTSwqOVtejfSbEhg4jZ0CDPG55nyhklUg,7185
|
|
21
25
|
xspect/xspect-web/.gitignore,sha256=_nGOe6uxTzy60tl_CIibnOUhXtP-DkOyuM-_s7m4ROg,253
|
|
22
26
|
xspect/xspect-web/README.md,sha256=Fa5cCk66ohbqD_AAVgnXUZLhuzshnLxhlUFhxyscScc,1942
|
|
23
27
|
xspect/xspect-web/components.json,sha256=5emhfq5JRW9J8Zga-1N5jAcj4B-r8VREXnH7Z6tZGNk,425
|
|
@@ -78,9 +82,9 @@ xspect/xspect-web/src/components/ui/switch.tsx,sha256=uIqRXtd41ba0eusIEUWVyYZv82
|
|
|
78
82
|
xspect/xspect-web/src/components/ui/table.tsx,sha256=M2-TIHKwPFWuXrwysSufdQRSMJT-K9jPzGOokfU6PXo,2463
|
|
79
83
|
xspect/xspect-web/src/components/ui/tabs.tsx,sha256=BImHKcdDCtrS3CCV1AGgn8qg0b65RB5P-QdH49IAhx0,1955
|
|
80
84
|
xspect/xspect-web/src/lib/utils.ts,sha256=66ibdQiEHKftZBq1OMLmOKqWma1BkO-O60rc1IQYwLE,165
|
|
81
|
-
xspect-0.
|
|
82
|
-
xspect-0.
|
|
83
|
-
xspect-0.
|
|
84
|
-
xspect-0.
|
|
85
|
-
xspect-0.
|
|
86
|
-
xspect-0.
|
|
85
|
+
xspect-0.6.0.dist-info/licenses/LICENSE,sha256=bhBGDKIRUVwYIHGOGO5hshzuVHyqFJajvSOA3XXOLKI,1094
|
|
86
|
+
xspect-0.6.0.dist-info/METADATA,sha256=_3lkPNVzF3iUOFGFaGRavSPfuJ_wdCQODA0qfU5GXJg,4632
|
|
87
|
+
xspect-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
88
|
+
xspect-0.6.0.dist-info/entry_points.txt,sha256=L7qliX3pIuwupQxpuOSsrBJCSHYPOPNEzH8KZKQGGUw,43
|
|
89
|
+
xspect-0.6.0.dist-info/top_level.txt,sha256=hdoa4cnBv6OVzpyhMmyxpJxEydH5n2lDciy8urc1paE,7
|
|
90
|
+
xspect-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|