Skip to content

Commit

Permalink
Merge pull request #272 from choosehappy/fix_classification_module
Browse files Browse the repository at this point in the history
small deconvolution bug fix
  • Loading branch information
jacksonjacobs1 authored Nov 22, 2023
2 parents 9b2753c + 69a99b0 commit 8943838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion histoqc/ClassificationModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def byExampleWithFeatures(s, params):
# convert grayscale images into binary images if images are not binary format
if mask.dtype.kind != 'b':
# warning log
msg = f"Mask file '{ex[1]}' is not a binary image"
msg = f"Mask file '{ex[1]}' is not a binary image. Automatically converting to binary..."
logging.warning(s['filename'] + ' - ' + msg)
s["warnings"].append(msg)
# convert to binary
Expand Down
4 changes: 2 additions & 2 deletions histoqc/DeconvolutionModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def separateStains(s, params):
sys.exit(1)
return

stain_matrix = getattr(sys.modules[__name__], stain, "")
stain_matrix = getattr(sys.modules[__name__], stain, None)

if stain_matrix == "":
if stain_matrix is None:
logging.error(f"{s['filename']} - Unknown stain matrix specified in DeconolutionModule.separateStains")
sys.exit(1)
return
Expand Down

0 comments on commit 8943838

Please sign in to comment.