Skip to content

Commit

Permalink
Merge branch 'bacpop-207-csv-microreact' of https://github.com/bacpop…
Browse files Browse the repository at this point in the history
…/beebop_py into bacpop-205-fix-network
  • Loading branch information
absternator committed Dec 16, 2024
2 parents eb5799b + 41fca0f commit 95482ce
Show file tree
Hide file tree
Showing 5 changed files with 7,126 additions and 3 deletions.
1 change: 1 addition & 0 deletions beebop/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def run_poppunk_internal(sketches: dict,
full_db_fs = DatabaseFileStore(
f"{dbs_location}/{species_args.fulldb}",
species_args.external_clusters_file,
species_args.db_metadata_file,
)

# store json sketches in storage, and store an initial output_cluster file
Expand Down
10 changes: 9 additions & 1 deletion beebop/filestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ class DatabaseFileStore:
"""

def __init__(
self, full_path: str, external_clusters_file: Optional[str] = None
self,
full_path: str,
external_clusters_file: Optional[str] = None,
db_metadata_file: Optional[str] = None,
):
"""
:param full_path: [path to database]
Expand All @@ -295,3 +298,8 @@ def __init__(
if external_clusters_file
else None
)
self.metadata = (
str(PurePath("beebop", "resources", db_metadata_file))
if db_metadata_file
else None
)
4 changes: 2 additions & 2 deletions beebop/poppunkWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def create_microreact(self, cluster: str, internal_cluster: str) -> None:
previous_distances=None,
network_file=None,
gpu_graph=self.args.visualise.gpu_graph,
info_csv=self.args.visualise.info_csv,
rapidnj=shutil.which("rapidnj"),
info_csv=self.db_fs.metadata,
rapidnj=shutil.which('rapidnj'),
api_key=None,
tree=self.args.visualise.tree,
mst_distances=self.args.visualise.mst_distances,
Expand Down
Loading

0 comments on commit 95482ce

Please # to comment.