4 Commits

Author SHA1 Message Date
af7edf0942 Changed development server publication condition
Some checks failed
autoBIGS.engine/pipeline/tag This commit looks good
autoBIGS.engine/pipeline/head There was a failure building this commit
2025-03-13 14:37:16 +00:00
481870db97 Updated tests to reflect new fasta read naming
All checks were successful
autoBIGS.engine/pipeline/head This commit looks good
2025-03-13 14:25:44 +00:00
62fdada9c1 Added original filename to csv output
Some checks reported errors
autoBIGS.engine/pipeline/head Something is wrong with the build of this commit
2025-03-13 14:17:08 +00:00
3074997db6 Removed unused file 2025-03-13 14:01:00 +00:00
4 changed files with 12 additions and 48 deletions

6
Jenkinsfile vendored
View File

@@ -36,7 +36,9 @@ pipeline {
parallel { parallel {
stage ("git.reslate.systems") { stage ("git.reslate.systems") {
when { when {
branch '**/main' not {
tag '*.*.*'
}
} }
environment { environment {
@@ -49,7 +51,7 @@ pipeline {
} }
stage ("pypi.org") { stage ("pypi.org") {
when { when {
tag '*.*' tag '*.*.*'
} }
environment { environment {
TOKEN = credentials('pypi.org') TOKEN = credentials('pypi.org')

View File

@@ -1,44 +0,0 @@
{% set name = "autoBIGS.engine" %}
{% set version = "0.12.1.dev1+gb8cebb8.d20250221" %}
package:
name: {{ name|lower|replace(".", "-") }}
version: {{ version }}
source:
url: file:///workspaces/autoBIGS.engine/dist/autobigs_engine-0.12.1.dev1%2Bgb8cebb8.d20250221.tar.gz
sha256: c86441b94f935cfa414ff28ca4c026a070e0fb15988ea3bb7d1a942859a09b16
build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0
run_exports:
- {{ pin_subpackage( name|lower|replace(".", "-"), max_pin="x.x") }}
requirements:
host:
- python >=3.12
- setuptools >=64
- setuptools-scm >=8
- pip
run:
- python >=3.12
- biopython ==1.85
- aiohttp ==3.11.*
test:
imports:
- autobigs
commands:
- pip check
requires:
- pip
about:
summary: A library to rapidly fetch fetch MLST profiles given sequences for various diseases.
license: GPL-3.0-or-later
license_file: LICENSE
home: https://github.com/Syph-and-VPD-Lab/autoBIGS.engine
extra:
recipe-maintainers:
- Harrison Deng

View File

@@ -1,5 +1,6 @@
import asyncio import asyncio
from io import TextIOWrapper from io import TextIOWrapper
from os import path
from typing import Any, AsyncGenerator, Iterable, Union from typing import Any, AsyncGenerator, Iterable, Union
from Bio import SeqIO from Bio import SeqIO
@@ -9,7 +10,7 @@ async def read_fasta(handle: Union[str, TextIOWrapper]) -> Iterable[NamedString]
fasta_sequences = asyncio.to_thread(SeqIO.parse, handle=handle, format="fasta") fasta_sequences = asyncio.to_thread(SeqIO.parse, handle=handle, format="fasta")
results = [] results = []
for fasta_sequence in await fasta_sequences: for fasta_sequence in await fasta_sequences:
results.append(NamedString(fasta_sequence.id, str(fasta_sequence.seq))) results.append(NamedString("{0}:{1}".format(path.basename(handle.name if isinstance(handle, TextIOWrapper) else handle), fasta_sequence.id), str(fasta_sequence.seq)))
return results return results
async def read_multiple_fastas(handles: Iterable[Union[str, TextIOWrapper]]) -> AsyncGenerator[Iterable[NamedString], Any]: async def read_multiple_fastas(handles: Iterable[Union[str, TextIOWrapper]]) -> AsyncGenerator[Iterable[NamedString], Any]:

View File

@@ -4,4 +4,9 @@ from autobigs.engine.reading import read_fasta
async def test_fasta_reader_not_none(): async def test_fasta_reader_not_none():
named_strings = await read_fasta("tests/resources/tohama_I_bpertussis.fasta") named_strings = await read_fasta("tests/resources/tohama_I_bpertussis.fasta")
for named_string in named_strings: for named_string in named_strings:
assert named_string.name == "BX470248.1" assert named_string.name is not None
async def test_fasta_reader_name_contains_file_and_id():
named_strings = await read_fasta("tests/resources/tohama_I_bpertussis.fasta")
for named_string in named_strings:
assert named_string.name == "tohama_I_bpertussis.fasta:BX470248.1"