diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 40b39f1..f6e80f7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ jobs: strategy: matrix: - os: [macos-13, ubuntu-latest] #macos-latest/macos-14 is M1 - some deps fail it due to not having M1 build (MMSeqs2) - python-version: ["3.9", "3.12"] + os: [macos-latest, ubuntu-latest] #macos-latest/macos-14 is M1 - some deps fail it due to not having M1 build (MMSeqs2) + python-version: ["3.12"] steps: - uses: "actions/checkout@v3" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ec34ef..8ae23d3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,13 +14,13 @@ jobs: - uses: actions/checkout@v3 - uses: conda-incubator/setup-miniconda@v3 with: - python-version: 3.9 + python-version: 3.12 activate-environment: plassembler environment-file: build/environment.yaml auto-activate-base: false channels: conda-forge,bioconda,defaults channel-priority: strict - auto-update-conda: true + auto-update-conda: true - name: Install plassembler shell: bash -l {0} diff --git a/pyproject.toml b/pyproject.toml index 5f9153b..38a3ddb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "plassembler" -version = "1.8.1" # change VERSION too +version = "1.8.2" # change VERSION too description = "Quickly and accurately assemble plasmids in hybrid sequenced bacterial isolates" authors = ["George Bouras "] license = "MIT" diff --git a/src/plassembler/utils/VERSION b/src/plassembler/utils/VERSION index a8fdfda..53adb84 100644 --- a/src/plassembler/utils/VERSION +++ b/src/plassembler/utils/VERSION @@ -1 +1 @@ -1.8.1 +1.8.2 diff --git a/src/plassembler/utils/db.py b/src/plassembler/utils/db.py index 75dc14d..209ea5c 100755 --- a/src/plassembler/utils/db.py +++ b/src/plassembler/utils/db.py @@ -14,6 +14,7 @@ from loguru import logger from plassembler.utils.cleanup import remove_directory +from plassembler.utils.util import get_version def check_db_installation(db_dir: Path, force: bool, install_flag: bool): @@ -75,8 +76,16 @@ def get_database_zenodo(db_dir: Path): db_url = "https://zenodo.org/record/10158040/files/201123_plassembler_v1.5.0_databases.tar.gz" requiredmd5 = "3a24bacc05bb857dc044fc6662b58db7" + version = get_version().strip() + + headers = { + "User-Agent": f"plassembler/{version} (contact: george.bouras@adelaide.edu.au)" + } + try: - with tar_path.open("wb") as fh_out, requests.get(db_url, stream=True) as resp: + with tar_path.open("wb") as fh_out, requests.get( + db_url, stream=True, headers=headers + ) as resp: total_length = resp.headers.get("content-length") if total_length is not None: # content length header is set total_length = int(total_length) diff --git a/src/plassembler/utils/run_canu.py b/src/plassembler/utils/run_canu.py index d447847..6dce4ec 100644 --- a/src/plassembler/utils/run_canu.py +++ b/src/plassembler/utils/run_canu.py @@ -33,7 +33,7 @@ def run_canu_correct( tool="canu -correct", input="", output="", - params=f" -p canu -d {canu_output_dir} genomeSize={total_flye_plasmid_length}m maxInputCoverage={coverage} stopOnLowCoverage=1 maxThreads={threads} -{canu_nano_or_pacbio} correctedErrorRate={corrected_error_rate} {longreads}", + params=f" -p canu -d {canu_output_dir} genomeSize={total_flye_plasmid_length}m maxInputCoverage={coverage} stopOnLowCoverage=1 maxThreads={threads} useGrid=false -{canu_nano_or_pacbio} correctedErrorRate={corrected_error_rate} {longreads}", logdir=logdir, outfile="", ) @@ -69,7 +69,7 @@ def run_canu( tool="canu", input="", output="", - params=f" -p canu -d {canu_output_dir} genomeSize={total_flye_plasmid_length}m maxInputCoverage={coverage} stopOnLowCoverage=1 maxThreads={threads} -{canu_nano_or_pacbio} correctedErrorRate={corrected_error_rate} {longreads}", + params=f" -p canu -d {canu_output_dir} genomeSize={total_flye_plasmid_length}m maxInputCoverage={coverage} stopOnLowCoverage=1 maxThreads={threads} useGrid=false -{canu_nano_or_pacbio} correctedErrorRate={corrected_error_rate} {longreads}", logdir=logdir, outfile="", )