Skip to content

Commit

Permalink
prevent flu-specific items from being dropped from non-flu tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sage-wright committed Aug 7, 2024
1 parent bcc947e commit 68ee6cf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG MERCURY_VER="1.0.6"
ARG MERCURY_VER="1.0.7"

FROM google/cloud-sdk:480.0.0-slim

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions mercury/Table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion mercury/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "v1.0.6"
__VERSION__ = "v1.0.7"

0 comments on commit 68ee6cf

Please sign in to comment.