XspecT 0.1.0__tar.gz → 0.1.3__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.
Files changed (107) hide show
  1. XspecT-0.1.3/.github/workflows/black.yml +11 -0
  2. XspecT-0.1.3/.github/workflows/docs.yml +33 -0
  3. XspecT-0.1.3/.github/workflows/test.yml +27 -0
  4. XspecT-0.1.3/.gitignore +177 -0
  5. {XspecT-0.1.0/src/XspecT.egg-info → XspecT-0.1.3}/PKG-INFO +1 -1
  6. XspecT-0.1.3/data/Results/Readme.txt +54 -0
  7. XspecT-0.1.3/data/Results/Strain-Typing/Assemblys as reference, all k-mers.csv +3079 -0
  8. XspecT-0.1.3/data/Results/Strain-Typing/Assemblys as reference, quick run.csv +3241 -0
  9. XspecT-0.1.3/data/Results/Strain-Typing/Core-Genome as Reference, quick run.csv +3079 -0
  10. XspecT-0.1.3/data/Results/Strain-Typing/Core-Genome as reference, all k-mers.csv +3079 -0
  11. XspecT-0.1.3/data/Results/Strain-Typing/Reads as Input, Assembly as Reference, 15% of the nucleotides changed.csv +300 -0
  12. XspecT-0.1.3/data/Results/Strain-Typing/Reads as Input, Assembly as Reference.csv +300 -0
  13. XspecT-0.1.3/data/Results/Strain-Typing/Reads as Input, Core-Genome as Reference, 15% of the nucleotides changed.csv +300 -0
  14. XspecT-0.1.3/data/Results/Strain-Typing/Reads as Input, Core-Genome as Reference.csv +300 -0
  15. XspecT-0.1.3/data/Results/Strain-Typing/StratifiedKFold.py +495 -0
  16. XspecT-0.1.3/data/Results/Strain-Typing/genomes_and_labels.csv +2709 -0
  17. XspecT-0.1.3/data/Results/XspecT_mini_csv/README +2 -0
  18. XspecT-0.1.3/docs/Instructions/pictures/About.png +0 -0
  19. XspecT-0.1.3/docs/Instructions/pictures/AddFilter.png +0 -0
  20. XspecT-0.1.3/docs/Instructions/pictures/AddSpecies1.png +0 -0
  21. XspecT-0.1.3/docs/Instructions/pictures/AddSpecies2.png +0 -0
  22. XspecT-0.1.3/docs/Instructions/pictures/BF.png +0 -0
  23. XspecT-0.1.3/docs/Instructions/pictures/ClAssT_Ergebnis1.png +0 -0
  24. XspecT-0.1.3/docs/Instructions/pictures/ClAssT_Ergebnis2.png +0 -0
  25. XspecT-0.1.3/docs/Instructions/pictures/ClAssT_Ergebnis3.png +0 -0
  26. XspecT-0.1.3/docs/Instructions/pictures/ClAssT_Hauptseite.png +0 -0
  27. XspecT-0.1.3/docs/Instructions/pictures/CommandLine_Input.png +0 -0
  28. XspecT-0.1.3/docs/Instructions/pictures/CommandLine_results.png +0 -0
  29. XspecT-0.1.3/docs/Instructions/pictures/CommandLine_whole.png +0 -0
  30. XspecT-0.1.3/docs/Instructions/pictures/How2Use.png +0 -0
  31. XspecT-0.1.3/docs/Instructions/pictures/HowtouseAspecT.png +0 -0
  32. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Ergebnis1.png +0 -0
  33. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Ergebnis2.png +0 -0
  34. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Ergebnis3.png +0 -0
  35. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Ergebnis4.png +0 -0
  36. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Hauptseite.png +0 -0
  37. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Runtime.png +0 -0
  38. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Runtime_Oxa.png +0 -0
  39. XspecT-0.1.3/docs/Instructions/pictures/XspecT_Startseite.png +0 -0
  40. XspecT-0.1.3/docs/Instructions/pictures/change_pw.png +0 -0
  41. XspecT-0.1.3/docs/Instructions/pictures/modify_vecs.png +0 -0
  42. XspecT-0.1.3/docs/Instructions/pictures/secretkey.png +0 -0
  43. XspecT-0.1.3/docs/Makefile +20 -0
  44. XspecT-0.1.3/docs/conf.py +29 -0
  45. XspecT-0.1.3/docs/img/logo.png +0 -0
  46. XspecT-0.1.3/docs/index.md +16 -0
  47. XspecT-0.1.3/docs/make.bat +35 -0
  48. XspecT-0.1.3/docs/quickstart.md +6 -0
  49. {XspecT-0.1.0 → XspecT-0.1.3}/pyproject.toml +35 -27
  50. {XspecT-0.1.0 → XspecT-0.1.3/src/XspecT.egg-info}/PKG-INFO +1 -1
  51. XspecT-0.1.3/src/XspecT.egg-info/SOURCES.txt +104 -0
  52. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/BF_v2.py +31 -42
  53. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/WebApp.py +15 -28
  54. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/XspecT_mini.py +15 -29
  55. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/main.py +1 -1
  56. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/search_filter.py +8 -8
  57. XspecT-0.1.3/src/xspect/static/How-To.png +0 -0
  58. XspecT-0.1.3/src/xspect/static/Logo.png +0 -0
  59. XspecT-0.1.3/src/xspect/static/Logo2.png +0 -0
  60. XspecT-0.1.3/src/xspect/static/Workflow_AspecT.png +0 -0
  61. XspecT-0.1.3/src/xspect/static/Workflow_ClAssT.png +0 -0
  62. XspecT-0.1.3/src/xspect/static/js.js +615 -0
  63. XspecT-0.1.3/src/xspect/static/main.css +280 -0
  64. XspecT-0.1.3/src/xspect/templates/400.html +64 -0
  65. XspecT-0.1.3/src/xspect/templates/401.html +62 -0
  66. XspecT-0.1.3/src/xspect/templates/404.html +62 -0
  67. XspecT-0.1.3/src/xspect/templates/500.html +62 -0
  68. XspecT-0.1.3/src/xspect/templates/about.html +544 -0
  69. XspecT-0.1.3/src/xspect/templates/home.html +51 -0
  70. XspecT-0.1.3/src/xspect/templates/layoutabout.html +87 -0
  71. XspecT-0.1.3/src/xspect/templates/layouthome.html +63 -0
  72. XspecT-0.1.3/src/xspect/templates/layoutspecies.html +468 -0
  73. XspecT-0.1.3/src/xspect/templates/species.html +33 -0
  74. XspecT-0.1.3/src/xspect/train_filter/README_XspecT_Erweiterung.md +119 -0
  75. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/create_svm.py +1 -1
  76. XspecT-0.1.3/tests/__init__.py +0 -0
  77. XspecT-0.1.3/tests/conftest.py +60 -0
  78. {XspecT-0.1.0 → XspecT-0.1.3}/tests/test_cli.py +18 -0
  79. {XspecT-0.1.0 → XspecT-0.1.3}/tests/test_file_io.py +4 -4
  80. {XspecT-0.1.0 → XspecT-0.1.3}/tests/test_flask.py +27 -27
  81. XspecT-0.1.0/src/XspecT.egg-info/SOURCES.txt +0 -37
  82. {XspecT-0.1.0 → XspecT-0.1.3}/LICENSE +0 -0
  83. {XspecT-0.1.0 → XspecT-0.1.3}/README.md +0 -0
  84. {XspecT-0.1.0 → XspecT-0.1.3}/setup.cfg +0 -0
  85. {XspecT-0.1.0 → XspecT-0.1.3}/src/XspecT.egg-info/dependency_links.txt +0 -0
  86. {XspecT-0.1.0 → XspecT-0.1.3}/src/XspecT.egg-info/entry_points.txt +0 -0
  87. {XspecT-0.1.0 → XspecT-0.1.3}/src/XspecT.egg-info/requires.txt +0 -0
  88. {XspecT-0.1.0 → XspecT-0.1.3}/src/XspecT.egg-info/top_level.txt +0 -0
  89. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/Bootstrap.py +0 -0
  90. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/Classifier.py +0 -0
  91. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/OXA_Table.py +0 -0
  92. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/XspecT_trainer.py +0 -0
  93. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/__init__.py +0 -0
  94. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/download_filters.py +0 -0
  95. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/file_io.py +0 -0
  96. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/map_kmers.py +0 -0
  97. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/__init__.py +0 -0
  98. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/extract_and_concatenate.py +0 -0
  99. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/get_paths.py +0 -0
  100. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/html_scrap.py +0 -0
  101. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/interface_XspecT.py +0 -0
  102. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/k_mer_count.py +0 -0
  103. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/ncbi_api/__init__.py +0 -0
  104. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/ncbi_api/download_assemblies.py +0 -0
  105. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/ncbi_api/ncbi_assembly_metadata.py +0 -0
  106. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/ncbi_api/ncbi_children_tree.py +0 -0
  107. {XspecT-0.1.0 → XspecT-0.1.3}/src/xspect/train_filter/ncbi_api/ncbi_taxon_metadata.py +0 -0
@@ -0,0 +1,11 @@
1
+ name: black
2
+ on: [push]
3
+ jobs:
4
+ black:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - name: Black Code Formatter
9
+ uses: lgeiger/black-action@master
10
+ with:
11
+ args: ". --check"
@@ -0,0 +1,33 @@
1
+ name: sphinx
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ docs:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: "3.x"
19
+ - name: Install package with docs extras
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install '.[docs]'
23
+ - name: Sphinx build
24
+ run: |
25
+ sphinx-build docs _build
26
+ - name: Deploy to GitHub Pages
27
+ uses: peaceiris/actions-gh-pages@v3
28
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
29
+ with:
30
+ publish_branch: gh-pages
31
+ github_token: ${{ secrets.GITHUB_TOKEN }}
32
+ publish_dir: _build/
33
+ force_orphan: true
@@ -0,0 +1,27 @@
1
+ name: test
2
+ on: [push]
3
+ jobs:
4
+ pytest:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - name: Set up Python
9
+ uses: actions/setup-python@v4
10
+ with:
11
+ python-version: "3.x"
12
+ - name: Install package
13
+ run: |
14
+ python -m pip install --upgrade pip
15
+ pip install '.[test]'
16
+ - name: Download filters
17
+ run: |
18
+ xspect download-filters
19
+ - name: Test with pytest
20
+ run: |
21
+ pytest --cov
22
+ - name: Upload coverage reports to Codecov
23
+ uses: codecov/codecov-action@v4
24
+ env:
25
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
26
+
27
+
@@ -0,0 +1,177 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ .idea/
161
+
162
+ .conda/
163
+ .vscode/
164
+ .DS_Store
165
+ genus_metadata/
166
+ output
167
+ filter/
168
+ files/
169
+ Training_data/
170
+
171
+ tests/test_assemblies/
172
+ string_list.txt
173
+ saved_options.txt
174
+
175
+ files/
176
+ out.gv
177
+ out.png
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: XspecT
3
- Version: 0.1.0
3
+ Version: 0.1.3
4
4
  Summary: Tool to monitor and characterize pathogens using Bloom filters.
5
5
  License: MIT License
6
6
 
@@ -0,0 +1,54 @@
1
+ These folders contain all the test-data.
2
+
3
+ === Folder Species-Assignment ===
4
+
5
+ This Folder contains the results (Score-Vectors) from the taxonomic Assignment of over 3000 Genomes using different SVM-Parameters and Bloom Filters.
6
+ File names explained:
7
+ T1 = Training-Set 1 with up to 4 Genomes/BF
8
+ T2 = Training-Set 2 with 1 Genome/BF
9
+ poly = polynomial kernel-function
10
+ rbf = radial basis-function
11
+ 1.0 and 1.5 refer to the Regulatory Parameter C of the SVM
12
+
13
+ Further files with the name Test-Set_X contain the Score-Vectors of Tests with different amounts of used k-mers
14
+ x = only every xth k-mer of the input-data was used
15
+
16
+ The file Training_data_spec.csv contains the training-data (support vectors) of the SVM
17
+
18
+
19
+ === Folder Strain typing ===
20
+
21
+ The Folder Strain-Typing contains the Score-vectors of both reference-datasets. Assembled Genomes and the
22
+ Core-Genome of A. baumannii have been tested.
23
+ Each dataset has been tested with the full-run (all k-mers of the Input-Sequence have been tested)
24
+ and the quick-run (only every 10th k-mer has been tested). The used refernce is emntioned in the file-name.
25
+ The Format is the following:
26
+
27
+ NCBI Accession (GCF_...), Score IC1, Score IC2, Score IC3, ..., Score IC8
28
+
29
+ The files with 'Reads as Input' are the results of tested non-overlapping read-samples.
30
+ The Format is the following:
31
+
32
+ Filename, number of tested reads, Score IC1, Score IC2, Score IC3, ..., Score IC8
33
+
34
+ If the filename contains '...15% of the nucleotides changed', then ~15% of the nucleotides
35
+ in a read have been changed in order to test sequencing-methods with high error rates.
36
+
37
+
38
+ === Folder OXA-Search ===
39
+
40
+ The file 'OXA search in genomes' contains the results of the OXA-Search in genomes, the Format is the following:
41
+
42
+ NCBI Accession (GCF_...), Score OXA-23, Score OXA-24, Score OXA-51, Score OXA-58
43
+
44
+
45
+ The file 'OXA genes' contains the results of the OXA-Search used on other OXA-genes from the four families:
46
+
47
+ correct OXA-Familie of the gene, OXA-Gene name, NCBI Accession, Score OXA-23, Score OXA-24, Score OXA-51, Score OXA-58
48
+
49
+
50
+ The files 'OXA-search in assemblys' and 'OXA-search in reads' contain the results of OXA-Search in Sequence-reds and theiren
51
+ assemblys. 250.000 reads per .fq-file have been used. The format is:
52
+
53
+ filename, Score OXA-23, Score OXA-24, Score OXA-51, Score OXA-58
54
+