Updated to reflect changes in Engine 0.10.*
This commit is contained in:
parent
4eca35a556
commit
32dcfd99f8
@ -8,7 +8,7 @@ dynamic = ["version"]
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autoBIGS-engine"
|
"autoBIGS-engine==0.10.*"
|
||||||
]
|
]
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases."
|
description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases."
|
||||||
|
@ -4,4 +4,4 @@ pytest-cov
|
|||||||
build
|
build
|
||||||
twine
|
twine
|
||||||
setuptools_scm
|
setuptools_scm
|
||||||
autoBIGS.engine
|
autoBIGS.engine==0.10.*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from argparse import ArgumentParser, Namespace
|
from argparse import ArgumentParser, Namespace
|
||||||
import asyncio
|
import asyncio
|
||||||
from autobigs.engine.data.remote.databases.bigsdb import BIGSdbIndex
|
from autobigs.engine.analysis.bigsdb import BIGSdbIndex
|
||||||
|
|
||||||
def setup_parser(parser: ArgumentParser):
|
def setup_parser(parser: ArgumentParser):
|
||||||
parser.description = "Fetches the latest BIGSdb MLST database definitions."
|
parser.description = "Fetches the latest BIGSdb MLST database definitions."
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
from argparse import ArgumentParser, Namespace
|
from argparse import ArgumentParser, Namespace
|
||||||
import asyncio
|
import asyncio
|
||||||
import datetime
|
import datetime
|
||||||
from autobigs.engine.data.local.csv import write_mlst_profiles_as_csv
|
from autobigs.engine.writing import write_mlst_profiles_as_csv
|
||||||
from autobigs.engine.data.local.fasta import read_multiple_fastas
|
from autobigs.engine.reading import read_multiple_fastas
|
||||||
from autobigs.engine.data.remote.databases.bigsdb import BIGSdbIndex
|
from autobigs.engine.analysis.bigsdb import BIGSdbIndex
|
||||||
|
|
||||||
|
|
||||||
def setup_parser(parser: ArgumentParser):
|
def setup_parser(parser: ArgumentParser):
|
||||||
@ -35,15 +35,6 @@ def setup_parser(parser: ArgumentParser):
|
|||||||
help="The output CSV name (.csv will be appended)."
|
help="The output CSV name (.csv will be appended)."
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"--exact", "-ex",
|
|
||||||
action="store_true",
|
|
||||||
dest="exact",
|
|
||||||
required=False,
|
|
||||||
default=False,
|
|
||||||
help="Should run exact matching rather than returning all similar ones"
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--stop-on-fail", "-sof",
|
"--stop-on-fail", "-sof",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@ -58,7 +49,7 @@ def setup_parser(parser: ArgumentParser):
|
|||||||
async def run(args: Namespace):
|
async def run(args: Namespace):
|
||||||
async with BIGSdbIndex() as bigsdb_index:
|
async with BIGSdbIndex() as bigsdb_index:
|
||||||
gen_strings = read_multiple_fastas(args.fastas)
|
gen_strings = read_multiple_fastas(args.fastas)
|
||||||
async with await bigsdb_index.build_profiler_from_seqdefdb(args.seqdefdb, args.schema) as mlst_profiler:
|
async with await bigsdb_index.build_profiler_from_seqdefdb(False, args.seqdefdb, args.schema) as mlst_profiler:
|
||||||
mlst_profiles = mlst_profiler.profile_multiple_strings(gen_strings, exact=args.exact)
|
mlst_profiles = mlst_profiler.profile_multiple_strings(gen_strings, exact=args.exact)
|
||||||
failed = await write_mlst_profiles_as_csv(mlst_profiles, args.out)
|
failed = await write_mlst_profiles_as_csv(mlst_profiles, args.out)
|
||||||
if len(failed) > 0:
|
if len(failed) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user