Skip to content

Commit

Permalink
BUGFIX: truncating gene names. Version bump to 1.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
alegiac95 committed Feb 7, 2023
1 parent aa08ace commit 7ccc56d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion imaging_transcriptomics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

__version__ = "1.1.10"
__version__ = "1.1.11"

from . import inputs
from . import reporting
Expand Down
4 changes: 3 additions & 1 deletion imaging_transcriptomics/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def load_gene_labels():
genes_labels_path = (
Path(__file__).resolve().parent / "data" / "gene_expression_labels.txt"
)
return pd.read_fwf(genes_labels_path, header=None).to_numpy()
# return pd.read_fwf(genes_labels_path, header=None).to_numpy()
return np.loadtxt(str(genes_labels_path), dtype="U",
delimiter="\n").reshape(-1, 1)


def get_geneset(gene_set: str):
Expand Down
1 change: 1 addition & 0 deletions imaging_transcriptomics/tests/inputs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def test_gene_labels_load():
assert labels[1635] == "C6orf106"
assert "SLC7A10" in labels
assert "audhd49b" not in labels
assert "LOC102723968" in labels


# GENESET FUNCTION TESTS
Expand Down

0 comments on commit 7ccc56d

Please sign in to comment.