Skip to content

Commit

Permalink
another bugfix for #10
Browse files Browse the repository at this point in the history
  • Loading branch information
j-andrews7 committed Oct 30, 2023
1 parent c89b070 commit 1478eda
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.1.3

**Release date: 10/30/2023**

- Additional bug fix for [#10](https://github.com/j-andrews7/strprofiler/issues/10), which
was causing alleles ending in 0 to be truncated, e.g. 10 -> 1.
This was due to a parsing error when trailing ".0"s were being removed.

## v0.1.2

**Release date: 10/17/2023**
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "strprofiler"
version = "0.1.2"
version = "0.1.3"
description = "A simple python utility to compare short tandem repeat (STR) profiles."
authors = ["Jared Andrews"]
license = "MIT"
Expand Down
9 changes: 4 additions & 5 deletions strprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ def str_ingress(
df.filter(like="Allele")
.apply(
lambda x: ",".join(
[str(y).strip().rstrip(".0") for y in x if str(y) != "nan"]
[str(y).strip() for y in x if str(y) != "nan"]
),
axis=1,
axis=1
)
.str.strip(",")
)
Expand All @@ -222,9 +222,8 @@ def str_ingress(
# Remove duplicate alleles.
for k in samps_dict.keys():
if k != "Sample":
samps_dict[k] = ",".join(
OrderedDict.fromkeys(samps_dict[k].split(","))
)
samps_dict[k] = _clean_element(samps_dict[k])


# Rename PentaD and PentaE from common spellings.
if penta_fix:
Expand Down

0 comments on commit 1478eda

Please sign in to comment.