Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cd-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: 'ubuntu-latest'
strategy:
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.13']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
Expand All @@ -28,6 +28,6 @@ jobs:
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-line-length=240 --statistics
flake8 . --count --ignore=F824 --exit-zero --max-line-length=240 --statistics
8 changes: 4 additions & 4 deletions .github/workflows/ci-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: ['ubuntu-latest']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.11']
os: ['ubuntu-latest']
python-version: ['3.13']
steps:
- uses: actions/checkout@v2
- uses: mamba-org/setup-micromamba@v1
- uses: actions/checkout@v6
- uses: mamba-org/setup-micromamba@v3
with:
micromamba-version: 'latest'
environment-name: 'platon'
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ $ python3 -m pip install --user cb-platon

Platon requires the following 3rd party executables which must be installed & executable:

- Pyrodigal (3.7.1) <https://doi.org/10.21105/joss.04296> <https://github.com/althonos/pyrodigal>
- Prodigal (2.6.3) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2848648> <https://github.com/hyattpd/Prodigal>
- Diamond (2.0.6) <https://pubmed.ncbi.nlm.nih.gov/25402007> <http://www.diamondsearch.org>
- Blast+ (2.10.1) <https://www.ncbi.nlm.nih.gov/pubmed/2231712> <https://blast.ncbi.nlm.nih.gov>
- MUMmer (4.0.0-beta2) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC395750/> <https://github.com/gmarcais/mummer>
- HMMER (3.3.1) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3695513/> <http://hmmer.org/>
- INFERNAL (1.1.4) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3810854> <http://eddylab.org/infernal>
- Diamond (2.2.0) <https://pubmed.ncbi.nlm.nih.gov/25402007> <http://www.diamondsearch.org>
- Blast+ (2.17.0) <https://www.ncbi.nlm.nih.gov/pubmed/2231712> <https://blast.ncbi.nlm.nih.gov>
- MUMmer (4.0.1) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC395750/> <https://github.com/gmarcais/mummer>
- HMMER (3.4) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3695513/> <http://hmmer.org/>
- INFERNAL (1.1.5) <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3810854> <http://eddylab.org/infernal>

### Database download

Expand Down
2 changes: 1 addition & 1 deletion db-scripts/build-hmms.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ process extractNRP {
errorStrategy 'ignore'
cpus 1
memory '1 GB'
conda 'seqtk=1.3 muscle=5.1 hmmer=3.3.2'
conda 'seqtk=1.5 muscle=5.3 hmmer=3.4.0'

input:
val(cluster) from chGeneCluster
Expand Down
4 changes: 2 additions & 2 deletions db-scripts/compute-rds-thresholds.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ process searchProts {
maxRetries 3
cpus 4
memory '4 GB'
conda 'prodigal=2.6.3 diamond=2.0.14'
conda 'pyrodigal=3.7.1 diamond=2.2.0'

input:
set val(type), val(id), val(subSequence) from chContigs
Expand All @@ -50,7 +50,7 @@ process searchProts {
script:
"""
echo '>${id}\n${subSequence}' > seq.fna
prodigal -i seq.fna -a cdss.faa -p meta
pyrodigal -i seq.fna -a cdss.faa -p meta
if [ -s cdss.faa ]
then
diamond blastp --query cdss.faa --db ${pcDb} --fast --threads ${task.cpus} --out output.tsv --max-target-seqs 1 --id 90 --query-cover 80 --subject-cover 80
Expand Down
8 changes: 4 additions & 4 deletions db-scripts/count-protein-hits.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ process callORFs {

errorStrategy 'ignore'
maxRetries 3
conda 'prodigal=2.6.3'
conda 'pyrodigal=3.7.1'

input:
set val(type), file('replicon.fna') from chInput
Expand All @@ -40,11 +40,11 @@ process callORFs {
script:
if( type == 'p' )
"""
prodigal -i replicon.fna -a cdss.faa -p meta
pyrodigal -i replicon.fna -a cdss.faa -p meta
"""
else
"""
prodigal -i replicon.fna -a cdss.faa
pyrodigal -i replicon.fna -a cdss.faa
"""
}

Expand All @@ -55,7 +55,7 @@ process searchProts {
maxRetries 3
cpus 4
memory '12 GB'
conda 'diamond=2.0.14'
conda 'diamond=2.2.0'

input:
set val(type), file(cdss) from chAA
Expand Down
15 changes: 7 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: platon
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- biopython>=1.78
- prodigal>=2.6.3
- diamond>=2.0.14
- blast>=2.12.0
- hmmer>=3.3.1
- infernal>=1.1.4
- mummer4>=4.0.0rc1
- biopython>=1.87
- pyrodigal>=3.7.1
- diamond>=2.2.0
- blast>=2.17.0
- hmmer>=3.4
- infernal>=1.1.5
- mummer4>=4.0.1
2 changes: 1 addition & 1 deletion platon.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hints:
SoftwareRequirement:
packages:
platon:
version: [ "1.7.0" ]
version: [ "1.8.0" ]

requirements:
ResourceRequirement:
Expand Down
2 changes: 1 addition & 1 deletion platon/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.7'
__version__ = '1.8'
5 changes: 2 additions & 3 deletions platon/functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import subprocess as sp

import platon.config as cfg
import platon.constants as pc

Expand Down Expand Up @@ -455,7 +454,7 @@ def predict_orfs(contigs, filteredDraftGenomePath):
proteins_path = cfg.tmp_path.joinpath('proteins.faa')
gff_path = cfg.tmp_path.joinpath('prodigal.gff')
cmd = [
'prodigal',
'pyrodigal',
'-i', str(filteredDraftGenomePath),
'-a', str(proteins_path),
'-c', # closed ends
Expand Down Expand Up @@ -491,7 +490,7 @@ def predict_orfs(contigs, filteredDraftGenomePath):
for line in fh:
if(line[0] != '#'):
cols = line.split('\t')
orf_id = cols[8].split(';')[0].split('=')[1].split('_')[1]
orf_id = cols[8].split(';')[0].split('=')[1].split('_')[-1]
orf = {
'start': int(cols[3]),
'end': int(cols[4]),
Expand Down
12 changes: 6 additions & 6 deletions platon/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def print_version(self):
VERSION_MAX_DIGIT = 1000000000000
VERSION_REGEX = re.compile(r'(\d+)\.(\d+)(?:\.(\d+))?') # regex to search for version number in tool output. Takes missing patch version into consideration.
DEPENDENCIES = [ # List of dependencies: tuples for: min version, max version, tool name & command line parameter, dependency check exclusion options
(Version(2,6,3), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('prodigal', '-v')),
(Version(2,0,14), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('diamond', 'help')),
(Version(2,12,0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('blastn', '-version')),
(Version(3,3,1), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('hmmsearch', '-h')),
(Version(4,0,0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('nucmer', '-V')),
(Version(1,1,2), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('cmscan', '-h'))
(Version(3,7,1), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('pyrodigal', '-V')),
(Version(2,2,0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('diamond', 'help')),
(Version(2,17,0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('blastn', '-version')),
(Version(3,4,0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('hmmsearch', '-h')),
(Version(4,0,1), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('nucmer', '-V')),
(Version(1,1,5), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, ('cmscan', '-h'))
]


Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
author_email='oliver.schwengers@computational.bio.uni-giessen.de',
url='https://github.com/oschwengers/platon',
packages=['platon'],
python_requires='>=3.8',
python_requires='>=3.10',
include_package_data=True,
zip_safe=False,
install_requires=[
'biopython >= 1.78'
'biopython >= 1.87',
'pyrodigal >= 3.7.1'
],
entry_points={
'console_scripts': [
Expand All @@ -36,10 +37,11 @@
classifiers=[
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Topic :: Scientific/Engineering :: Bio-Informatics',
Expand Down