Skip to content

Commit

Permalink
update percentage limit for tngs
Browse files Browse the repository at this point in the history
  • Loading branch information
sage-wright committed Jun 6, 2024
1 parent 51d7f90 commit dd31ec7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Shelby Bennett, Erin Young, Curtis Kapsak, & Kutluhan Incekara

ARG SAMTOOLS_VER="1.18"
ARG TBP_PARSER_VER="1.5.8"
ARG TBP_PARSER_VER="1.5.9"

FROM ubuntu:jammy as builder

Expand Down Expand Up @@ -42,7 +42,7 @@ ARG TBP_PARSER_VER
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="tbp-parser"
LABEL software.version="1.5.8"
LABEL software.version="1.5.9"
LABEL description="tbp-parser and samtools"
LABEL website="https://github.com/theiagen/tbp-parser"
LABEL license="https://github.com/theiagen/tbp-parser/blob/main/LICENSE"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ See also [this page](https://theiagen.notion.site/tbp-parser-b02bef0cbc814b12987
We highly recommend using the following Docker image to run tbp-parser:

```markdown
docker pull us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.5.8
docker pull us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.5.9
```

The entrypoint for this Docker image is the tbp-parser help message. To run this container interactively, use the following command:

```markdown
docker run -it --entrypoint=/bin/bash us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.5.8
docker run -it --entrypoint=/bin/bash us-docker.pkg.dev/general-theiagen/theiagen/tbp-parser:1.5.9
# Once inside the container interactively, you can run the tbp-parser tool
python3 /tbp-parser/tbp_parser/tbp_parser.py -v
# v1.5.8
# v1.5.9
```

### Locally with Python
Expand Down
10 changes: 6 additions & 4 deletions tbp_parser/LIMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ def get_id(self):
if self.tngs:
number_of_lims_genes_above_coverage_threshold = sum(int(globals.COVERAGE_DICTIONARY[gene]) >= 90 for gene in globals.COVERAGE_DICTIONARY.keys())
percentage_lims_genes_above = number_of_lims_genes_above_coverage_threshold / len(globals.COVERAGE_DICTIONARY.keys())
# if the percentage of genes above the coverage threshold is greater than 70%, then we can call the lineage
percentage_limit = 0.7
else:
number_of_lims_genes_above_coverage_threshold = sum(int(globals.COVERAGE_DICTIONARY[gene]) >= globals.COVERAGE_THRESHOLD for gene in globals.GENES_FOR_LIMS)
percentage_lims_genes_above = number_of_lims_genes_above_coverage_threshold / len(globals.GENES_FOR_LIMS)
# if the percentage of genes above the coverage threshold is greater than 90%, then we can call the lineage
percentage_limit = 0.9

self.logger.debug("LIMS:The percentage of LIMS genes above the coverage threshold is {}".format(percentage_lims_genes_above))

# if the percentage of genes above the coverage threshold is greater than 90%, then we can call the lineage
percentage_limit = 0.9


with open(self.input_json) as json_fh:
input_json = json.load(json_fh)

Expand Down
2 changes: 1 addition & 1 deletion tbp_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "v1.5.8"
__VERSION__ = "v1.5.9"

0 comments on commit dd31ec7

Please sign in to comment.