Compare commits
4 Commits
8e1b30ae7d
...
develop
Author | SHA1 | Date | |
---|---|---|---|
ae96f2f9df | |||
15ad241303 | |||
b56c75849c | |||
09cc9787fd |
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -40,7 +40,6 @@ pipeline {
|
||||
when {
|
||||
branch '**/main'
|
||||
}
|
||||
|
||||
environment {
|
||||
CREDS = credentials('username-password-rs-git')
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
readme = "README.md"
|
||||
license = {text = "GPL-3.0-or-later"}
|
||||
dependencies = [
|
||||
"autoBIGS-engine==0.13.*"
|
||||
"autoBIGS-engine==0.14.*"
|
||||
]
|
||||
requires-python = ">=3.12"
|
||||
description = "A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases."
|
||||
|
@@ -53,18 +53,19 @@ async def run(args: Namespace):
|
||||
writer.writerows(sorted_seqdef_dbs)
|
||||
print("\nDatabase output written to {0}".format(args.csv_output))
|
||||
|
||||
csv_scheme_rows = []
|
||||
for bigsdb_scheme_name in args.list_bigsdb_schemes:
|
||||
schemes = await bigsdb_index.get_schemes_for_seqdefdb(bigsdb_scheme_name)
|
||||
csv_scheme_rows.extend([(name, id, bigsdb_scheme_name) for name, id in sorted(schemes.items())])
|
||||
print("The following are the known schemes for \"{0}\", and their associated IDs:".format(bigsdb_scheme_name))
|
||||
print("\n".join(["{0}: {1}".format(name, id) for name, id, database in csv_scheme_rows]))
|
||||
if args.csv_output:
|
||||
with open(args.csv_output, "w") as csv_out_handle:
|
||||
writer = csv.writer(csv_out_handle)
|
||||
writer.writerow(("Name", "ID", "Database Name"))
|
||||
writer.writerows(csv_scheme_rows)
|
||||
print("\nscheme list output written to {0}".format(args.csv_output))
|
||||
if args.list_bigsdb_schemes:
|
||||
csv_scheme_rows = []
|
||||
for bigsdb_scheme_name in args.list_bigsdb_schemes:
|
||||
schemes = await bigsdb_index.get_schemes_for_seqdefdb(bigsdb_scheme_name)
|
||||
csv_scheme_rows.extend([(name, id, bigsdb_scheme_name) for name, id in sorted(schemes.items())])
|
||||
print("The following are the known schemes for \"{0}\", and their associated IDs:".format(bigsdb_scheme_name))
|
||||
print("\n".join(["{0}: {1}".format(name, id) for name, id, database in csv_scheme_rows]))
|
||||
if args.csv_output:
|
||||
with open(args.csv_output, "w") as csv_out_handle:
|
||||
writer = csv.writer(csv_out_handle)
|
||||
writer.writerow(("Name", "ID", "Database Name"))
|
||||
writer.writerows(csv_scheme_rows)
|
||||
print("\nscheme list output written to {0}".format(args.csv_output))
|
||||
|
||||
def run_asynchronously(args: Namespace):
|
||||
asyncio.run(run(args))
|
||||
|
@@ -79,7 +79,7 @@ async def run(args: Namespace):
|
||||
if not isinstance(mlst_profiler, BIGSdbMLSTProfiler):
|
||||
raise TypeError("MLST profiler type invalid")
|
||||
mlst_profiles = mlst_profiler.profile_multiple_strings(gen_strings, args.stop_on_fail)
|
||||
failed = await write_mlst_profiles_as_csv(mlst_profiles, args.out)
|
||||
failed = await write_mlst_profiles_as_csv(mlst_profiles, args.out, await bigsdb_index.get_scheme_loci(args.seqdefdb, selected_scheme_id))
|
||||
if len(failed) > 0:
|
||||
print(f"A total of {len(failed)} IDs failed (no profile found):\n{"\n".join(failed)}")
|
||||
print(f"Completed fetching from {args.seqdefdb} for {scheme_name_lookup[selected_scheme_id]}s for {len(fastas)} sequences.")
|
||||
|
Reference in New Issue
Block a user