Compare commits
4 Commits
features/a
...
0.13.1
Author | SHA1 | Date | |
---|---|---|---|
af7edf0942 | |||
481870db97 | |||
62fdada9c1 | |||
3074997db6 |
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -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')
|
||||||
|
@@ -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
|
|
@@ -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]:
|
||||||
|
@@ -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"
|
||||||
|
Reference in New Issue
Block a user