From 68ee6cff322925fa15af5bcba2f1d352e1bd7f1c Mon Sep 17 00:00:00 2001 From: Sage Wright Date: Wed, 7 Aug 2024 19:11:56 +0000 Subject: [PATCH] prevent flu-specific items from being dropped from non-flu tables --- Dockerfile | 2 +- README.md | 6 +++--- mercury/Table.py | 5 +++-- mercury/__init__.py | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7e03bd..37c618d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG MERCURY_VER="1.0.6" +ARG MERCURY_VER="1.0.7" FROM google/cloud-sdk:480.0.0-slim diff --git a/README.md b/README.md index 19473c6..ead2a2e 100644 --- a/README.md +++ b/README.md @@ -27,16 +27,16 @@ Default databases by organism: We highly recommend using the following Docker image to run Mercury: ```bash -docker pull us-docker.pkg.dev/general-theiagen/theiagen/mercury:1.0.6 +docker pull us-docker.pkg.dev/general-theiagen/theiagen/mercury:1.0.7 ``` The entrypoint for this Docker image is the Mercury help message. To run this container interactively, use the following command: ```bash -docker run -it --entrypoint=/bin/bash us-docker.pkg.dev/general-theiagen/theiagen/mercury:1.0.6 +docker run -it --entrypoint=/bin/bash us-docker.pkg.dev/general-theiagen/theiagen/mercury:1.0.7 # Once inside the container interactively, you can run the tbp-parser tool python3 /mercury/mercury/mercury.py -v -# v1.0.6 +# v1.0.7 ``` ### Locally with Python diff --git a/mercury/Table.py b/mercury/Table.py index 489ece4..6661bb4 100644 --- a/mercury/Table.py +++ b/mercury/Table.py @@ -200,8 +200,9 @@ def make_biosample_csv(self): # strip off "Type_" from beginning of Type, e.g. "Type_A" -> "A" self.logger.debug("DEBUG:User did not supply isolate or strain metadata columns, creating isolate column for Flu samples now...") biosample_metadata["isolate"] = (biosample_metadata["abricate_flu_type"].str.replace("Type_","") + "/" + biosample_metadata["state"] + "/" + biosample_metadata["sample_name"] + "/" + biosample_metadata["year"] + " (" + biosample_metadata["abricate_flu_subtype"] + ")") - # Remove 4 extra columns from the output table prior to creating TSV file (these are simply used to create the isolate column) - biosample_metadata.drop(["abricate_flu_type", "abricate_flu_subtype", "year", "state"], axis=1, inplace=True) + + # Remove 4 extra columns from the output table prior to creating TSV file (these are simply used to create the isolate column) + biosample_metadata.drop(["abricate_flu_type", "abricate_flu_subtype", "year", "state"], axis=1, inplace=True) biosample_metadata.to_csv(self.output_prefix + "_biosample_metadata.tsv", sep='\t', index=False) self.logger.debug("TABLE:BioSample metadata file created") diff --git a/mercury/__init__.py b/mercury/__init__.py index 2e1805c..bef6d07 100644 --- a/mercury/__init__.py +++ b/mercury/__init__.py @@ -1 +1 @@ -__VERSION__ = "v1.0.6" \ No newline at end of file +__VERSION__ = "v1.0.7" \ No newline at end of file