Skip to content

Commit 01c65ba

Browse files
authored
Merge pull request #5 from BIONF/dev
Refactoring & new web app
2 parents 1723495 + 569ec9d commit 01c65ba

File tree

85 files changed

+2570
-25015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2570
-25015
lines changed

.github/workflows/pylint.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pylint
2+
on: [push]
3+
jobs:
4+
black:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: Pylint Code Linter
9+
run: |
10+
python -m pip install --upgrade pip
11+
pip install .
12+
pip install pylint
13+
pylint --fail-under=9.0 src/xspect

.github/workflows/pypi.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
jobs:
9+
release-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
19+
- name: Build release distributions
20+
run: |
21+
python -m pip install build
22+
python -m build
23+
24+
- name: Upload distributions
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: release-dists
28+
path: dist/
29+
30+
31+
upload_testpypi:
32+
needs: [release-build]
33+
runs-on: ubuntu-latest
34+
environment: testpypi
35+
permissions:
36+
id-token: write
37+
if: github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease
38+
steps:
39+
- uses: actions/download-artifact@v4
40+
with:
41+
name: release-dists
42+
path: dist/
43+
44+
- uses: pypa/gh-action-pypi-publish@release/v1
45+
with:
46+
repository-url: https://test.pypi.org/legacy/
47+
48+
upload_pypi:
49+
needs: [release-build]
50+
runs-on: ubuntu-latest
51+
environment: pypi
52+
permissions:
53+
id-token: write
54+
if: github.event_name == 'release' && github.event.action == 'published' && !github.event.release.prerelease
55+
steps:
56+
- uses: actions/download-artifact@v4
57+
with:
58+
name: release-dists
59+
path: dist/
60+
61+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,8 @@ saved_options.txt
174174

175175
files/
176176
out.gv
177-
out.png
177+
out.png
178+
179+
xspect-data/
180+
181+
.devcontainer/

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# XspecT - Acinetobacter Species Assignment Tool
2-
<img src="/src/xspect/static/Logo.png" height="50%" width="50%">
2+
![Test](https://github.com/bionf/xspect2/actions/workflows/test.yml/badge.svg)
3+
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
4+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5+
6+
<img src="/src/docs/img/logo.png" height="50%" width="50%">
37
<!-- start intro -->
4-
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](https://en.wikipedia.org/wiki/Bloom_filter) and a [Support Vector Machine](https://en.wikipedia.org/wiki/Support-vector_machine). It also identifies existing [blaOxa-genes](https://en.wikipedia.org/wiki/Beta-lactamase#OXA_beta-lactamases_(class_D)) and provides a list of relevant research papers for further information.
8+
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.
59
<br/><br/>
610

711
XspecT utilizes the uniqueness of kmers and compares extracted kmers from the input-data to a reference database. Bloom Filter ensure a fast lookup in this process. For a final prediction the results are classified using a Support Vector Machine.
@@ -11,6 +15,10 @@ Local extensions of the reference database are supported.
1115
<br/>
1216

1317
The tool is available as a web-based application and a smaller command line interface.
18+
19+
[Bloom Filters]: https://en.wikipedia.org/wiki/Bloom_filter
20+
[Support Vector Machine]: https://en.wikipedia.org/wiki/Support-vector_machine
21+
[blaOxa-genes]: https://en.wikipedia.org/wiki/Beta-lactamase#OXA_beta-lactamases_(class_D)
1422
<!-- end intro -->
1523

1624
<!-- start quickstart -->
@@ -19,11 +27,7 @@ To install Xspect, please download the lastest 64 bit Python version and install
1927
```
2028
pip install xspect
2129
```
22-
If you would like to train filters yourself, you need to install Jellyfish, which is used to count distinct k-meres in the assemblies. It can be installed using bioconda:
23-
```
24-
conda install -c bioconda jellyfish
25-
```
26-
On Apple Silicon, it is possible that this command installs an incorrect Jellyfish package. Please refer to the official [Jellyfish project](https://github.com/gmarcais/Jellyfish) for installation guidance.
30+
Please note that Apple Silicon is currently not supported.
2731

2832
## Usage
2933
### Get the Bloomfilters
@@ -37,23 +41,19 @@ xspect train you-ncbi-genus-name
3741
```
3842

3943
### How to run the web app
40-
Run the following command lines in a console, a browser window will open automatically after the application is fully loaded.
44+
To run the web app, install and run [XspecT Web](https://github.com/aromberg/xspect-web). Additionally, run XspecT in API mode:
4145
```
42-
xspect web
46+
xspect api
4347
```
4448

4549
### How to use the XspecT command line interface
4650
Run xspect with the configuration you want to run it with as arguments.
4751
```
4852
xspect classify your-genus path/to/your/input-set
4953
```
50-
For further instructions on how to use the command line interface, execute:
54+
For further instructions on how to use the command line interface, please refer to the [documentation] or execute:
5155
```
5256
xspect --help
5357
```
54-
<!-- end quickstart -->
55-
56-
## Input Data
57-
XspecT is able to use either raw sequence-reads (FASTQ-format .fq/.fastq) or already assembled genomes (FASTA-format .fasta/.fna). Using sequence-reads saves up the assembly process but high-quality reads with a low error-rate are needed (e.g. Illumina-reads).
58-
59-
The amount of reads that will be used has to be set by the user when using sequence-reads. The minimum amount is 5000 reads for species classification and 500 reads for sub-type classification. The maximum number of reads is limited by the browser and is usually around ~8 million reads. Using more reads will lead to a increased runtime (xsec./1mio reads).
58+
[documentation]: https://bionf.github.io/XspecT2/cli.html
59+
<!-- end quickstart -->

data/Results/Readme.txt

-54
This file was deleted.

0 commit comments

Comments
 (0)