HistoQC: An open-source quality control tool for digital pathology slides

crack_slidepenmark_slide

airbubble_slide

Our paper is out in: Journal of Clinical Oncology: Clinical Cancer Informatics

Purpose: Digital pathology (DP), referring to the digitization of tissue slides, is beginning to change the landscape of clinical diagnostic workflows and has engendered active research within the area of computational pathology. One of the challenges in DP is the presence of artifacts and batch effects; unintentionally introduced during both routine slide preparation (e.g., staining, tissue folding, etc.) as well as digitization (e.g., blurriness, variations in contrast and hue). Manual review of glass and digital slides is laborious, qualitative, and subject to intra/inter-reader variability. There is thus a critical need for a reproducible automated approach of precisely localizing artifacts in order to identify slides which need to be reproduced or regions which should be avoided during computational analysis.

Methods: Here we present HistoQC, a tool for rapidly performing quality control to not only identify and delineate artifacts but also discover cohort level “outliers” (e.g., slides stained darker/lighter than other slides in the cohort). This open-source tool employs a combination of image metrics (e.g., color histograms, brightness, contrast), features (e.g., edge detectors), and supervised classifiers (e.g., pen detection) to identify artifact free regions on digitized slides. These regions and metrics are presented to the user via an interactive graphical user interface, facilitating artifact detection through real-time visualization and filtering. These same metrics afford users the opportunity to explicitly define acceptable tolerances for their workflows.

Results: HistoQC’s output on n=450 slides from The Cancer Genome Atlas (TCGA) was reviewed by 2 pathologists and found to be suitable for computational analysis over 95% of the time.

Conclusion: These results suggest that HistoQC could provide an automated, quantifiable, quality control process for identifying artifacts and measuring slide quality, in turn helping to improve both the repeatability and robustness of DP workflows.

Manuscript available here: HistoQC_w_supplemental

Code available here: HistoQC Github repo

Wiki available here: HistoQC Wiki

Slide Repository is available here: HistoQCRepo

More in-depth tutorial to follow!

histoqc

 

52 thoughts on “HistoQC: An open-source quality control tool for digital pathology slides”

  1. Hi,
    Is Histoqc compatible to work with JPEG.
    IS there any way to convert JPEG files into SVS files?

    Thanks

    1. at the moment, no. not out of a technical issue, but because a JPEG information does not contain the necessary meta data needed for histoQC to work. For example, SVS files (and other whole slide image formats) have magnification embedded in the header, which allows histoqc to appropriately scale the image. To my knowledge, “regular” JPEGs are do not contain this information, though some TIF formats may. Since we use openslide as a backend, any of the formats it supports, histoqc supports: https://openslide.org/formats/

      1. Using a scanner/resolution table as a fallback when openslide cannot find the mpp helped in my case. If openslide cannot read a non-dp format, pyvips was of help, which can read the dp as well as more non-dp formats (but got the mpp wrong at a tiff container while openslide got it…). Not sure whether an interactive scanner model input would be easy to implement, yet.

        1. cool! do you have some code which you can share?

          one difficult component overall is that occasionally the datasets are heterogeneously scanned. for example, TCGA BRCA has a number of images scanned at 20x and a number at 40x, so I didn’t want to implement a general default, as it would be wrong in some cases and likely give false confidence to users. ultimately i would like to implement a magnification prediction algorithm to fall back to, but how to do so in a high throughput robust manner is still not obvious to me

  2. I ran the command as suggested in the instruction, like
    e.g,: HistoQC> python qc_pipeline.py -c config.ini -n 4 remote_file_location/*.svs
    , and always encountered errors on the symlink part, is that part necessary or I can just turn it off?

    1. sorry, not sure i understand. are you asking for to quality control those types of images, or to perform the computation itself?

  3. Great work! In your paper, you mention that the tool is made available with a public repository of slides containing artifacts. I wasn’t able to find where these images are. Could you point us to those?

    Thanks!!

  4. Great. I am hoping to use it for my slides. However, I have problems running it properly. I downloaded some svs files to test this pipeline from the provided link.
    When I run this pipeline, I get the following error:
    2019-11-13 15:42:12,463 – WARNING – Lossy conversion from int64 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
    .
    .
    .
    2019-11-13 15:42:20,841 – ERROR – /Users/admin/Documents/HistoQC-master/TCGA-A1-A0SF-01Z-00-DX1.7F252D89-EA78-419F-A969-1B7313D77499.svs – – Error analyzing file (skipping): Inappropriate argument type. (“remove_small_holes() got an unexpected keyword argument ‘min_size'”, ‘/Users/admin/Documents/HistoQC-master/TCGA-A1-A0SF-01Z-00-DX1.7F252D89-EA78-419F-A969-1B7313D77499.svs’, ‘')

    and similar warnings and subsequent errors happen for the other modules, leading to skipping them.

    1. make sure you’re using the versions of the packages as specified in the requirements.txt, they modified the parameters to some of the functions recently and we had to realign and freeze

      1. Ok. when I was installing the packages, it gave an error for

        ERROR: Invalid requirement: ‘scikit-image=0.15.0’ (from line 2 of requirements.txt)

        and I removed the version number!

          1. Thanks so much. The problem was solved. But again something else emerged:

            2019-11-13 18:04:35,812 – ERROR – /Users/admin/Documents/HistoQC-master/TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – – Error analyzing file (skipping): Inappropriate argument value (of correct type). (‘zero-size array to reduction operation maximum which has no identity’, ‘/Users/admin/Documents/HistoQC-master/TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs’, ‘')
            2019-11-13 18:04:35,848 - INFO - ------------Done---------

            2019-11-13 18:04:35,849 - INFO - These images failed (available also in error.log), warnings are listed in warnings column in output:
            2019-11-13 18:04:35,849 - INFO - /Users/admin/Documents/HistoQC-master/TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs Inappropriate argument value (of correct type). ('zero-size array to reduction operation maximum which has no identity', '/Users/admin/Documents/HistoQC-master/TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs', '
            ')
            2019-11-13 18:04:35,849 - INFO - Symlink to output directory created

          2. I suspect there is something wrong with your installation. I downloaded the same svs file, and cloned the github repository and it worked to completion without issue:

            C:\temp\HistoQC>python qc_pipeline.py *.svs
            2019-11-13 20:30:48,632 – WARNING – Configuration file not set (–config), using default: C:\temp\HistoQC/config.ini
            2019-11-13 20:30:48,632 – INFO – Pipeline will use these steps:
            2019-11-13 20:30:48,632 – INFO – BasicModule getBasicStats
            2019-11-13 20:30:49,076 – INFO – ClassificationModule byExampleWithFeatures:coverslip_edge
            2019-11-13 20:30:49,220 – INFO – LightDarkModule getIntensityThresholdPercent:tissue
            2019-11-13 20:30:49,220 – INFO – LightDarkModule getIntensityThresholdPercent:darktissue
            2019-11-13 20:30:49,220 – INFO – BubbleRegionByRegion detectSmoothness
            2019-11-13 20:30:49,225 – INFO – MorphologyModule removeFatlikeTissue
            2019-11-13 20:30:49,230 – INFO – MorphologyModule fillSmallHoles
            2019-11-13 20:30:49,230 – INFO – MorphologyModule removeSmallObjects
            2019-11-13 20:30:49,230 – INFO – BlurDetectionModule identifyBlurryRegions
            2019-11-13 20:30:49,235 – INFO – BasicModule finalProcessingSpur
            2019-11-13 20:30:49,235 – INFO – BasicModule finalProcessingArea
            2019-11-13 20:30:49,235 – INFO – HistogramModule compareToTemplates
            2019-11-13 20:30:49,235 – INFO – HistogramModule getHistogram
            2019-11-13 20:30:49,235 – INFO – BrightContrastModule getContrast
            2019-11-13 20:30:49,240 – INFO – BrightContrastModule getBrightnessGray
            2019-11-13 20:30:49,240 – INFO – BrightContrastModule getBrightnessByChannelinColorSpace:RGB
            2019-11-13 20:30:49,240 – INFO – BrightContrastModule getBrightnessByChannelinColorSpace:YUV
            2019-11-13 20:30:49,240 – INFO – DeconvolutionModule seperateStains
            2019-11-13 20:30:49,245 – INFO – SaveModule saveFinalMask
            2019-11-13 20:30:49,245 – INFO – SaveModule saveThumbnails
            2019-11-13 20:30:49,245 – INFO – BasicModule finalComputations
            2019-11-13 20:30:49,245 – INFO – ———-
            2019-11-13 20:30:49,245 – INFO – Number of files detected by pattern: 1
            2019-11-13 20:30:49,250 – INFO – —–Working on: C:\temp\HistoQC\TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs 1 of 1
            2019-11-13 20:30:49,305 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getMag
            2019-11-13 20:30:51,348 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getBasicStats
            2019-11-13 20:30:51,349 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – ClassificationModule.byExample: coverslip_edge
            2019-11-13 20:30:51,351 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – Training model ClassificationModule.byExample:coverslip_edge
            2019-11-13 20:30:55,094 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – Training model ClassificationModule.byExample:coverslip_edge….done
            2019-11-13 20:31:12,236 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:12,817 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – LightDarkModule.getIntensityThresholdPercent: nonwhite
            2019-11-13 20:31:13,755 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:15,404 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – LightDarkModule.getIntensityThresholdPercent: dark
            2019-11-13 20:31:16,304 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:16,723 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – BubbleRegionByRegion.detectSmoothness
            2019-11-13 20:31:19,313 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:19,907 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – removeFatlikeTissue
            2019-11-13 20:31:21,426 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:21,863 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – fillSmallHoles
            2019-11-13 20:31:22,059 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:22,773 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – removeSmallObjects
            2019-11-13 20:31:22,961 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:31:23,961 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – identifyBlurryRegions
            2019-11-13 20:32:20,979 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:21,826 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – finalProcessingSpur
            2019-11-13 20:32:22,398 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:22,849 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – finalProcessingArea
            2019-11-13 20:32:23,027 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:23,399 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – compareToTemplates
            2019-11-13 20:32:23,601 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getHistogram
            2019-11-13 20:32:23,987 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getContrast
            2019-11-13 20:32:24,312 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getContrast
            2019-11-13 20:32:24,628 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getContrast
            2019-11-13 20:32:24,678 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – getContrast
            2019-11-13 20:32:24,965 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – seperateStains
            2019-11-13 20:32:25,618 – WARNING – Lossy conversion from float64 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:26,111 – WARNING – Lossy conversion from float64 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:26,614 – WARNING – Lossy conversion from float64 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:26,947 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – saveUsableRegion
            2019-11-13 20:32:27,004 – WARNING – Lossy conversion from int32 to uint8. Range [0, 255]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:28,095 – WARNING – Lossy conversion from float64 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning.
            2019-11-13 20:32:43,462 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – saveThumbnail
            2019-11-13 20:32:56,325 – INFO – TCGA-A1-A0SM-01Z-00-DX1.AD503DBD-4D93-4476-B467-F091254FDF78.svs – creating image thumb of size 500.0
            2019-11-13 20:32:57,158 – INFO – ————Done———

            2019-11-13 20:32:57,158 – INFO – These images failed (available also in error.log), warnings are listed in warnings column in output:
            Traceback (most recent call last):
            File “qc_pipeline.py”, line 263, in
            os.symlink( origin, target, target_is_directory=True)
            OSError: symbolic link privilege not held

            C:\temp\HistoQC>

  5. Thanks Andrew for sharing this pipeline. I have tried it with your test data. But my images are in czi format. Do you have any suggestions for this format of data?
    Thanks.

    1. unfortunately a bit tricky since openslide doesn’t support it. is there some type of converter to available to convert it to a more popular format?

  6. Hi Andrew,

    Thanks for HistoQC which is a great work. Somehow, I am getting an error due to openslide issue. Would you please help me how to get over with it ?

    openslide.lowlevel.OpenSlideError: Unsupported TIFF compression: 7

    1. what is the file type? what scanner did the file come from? since histoqc uses openslide as the backend for reading the files, we’re limited to files which can be opened by their library

        1. sorry i misread the error message. can you open up an issue on github and include the output of “pip freeze”? also, did you try another SVS, for example one from here http://histoqcrepo.com/ ? we might need to be able to look at the particular file you have, is that possible?

  7. Hi Andrew,

    When I ran the basic command like this: python qc_pipeline.py -c config.ini -n 4 ./images/*.svs, I am getting following errors. Would you please help me how to solve these 2 errors?

    Thanks,

    Errors:
    ———————————–
    2020-01-10 10:08:32,583 – INFO – Number of files detected by pattern: 1
    2020-01-10 10:08:32,611 – INFO – —–Working on: C:\Users\kayas7\Documents\HistoQC\images\GO29436_1115_2_390920_HE_280922005.svs 1 of 1
    2020-01-10 10:08:32,637 – INFO – GO29436_1115_2_390920_HE_280922005.svs – getMag
    2020-01-10 10:08:32,637 – WARNING – GO29436_1115_2_390920_HE_280922005.svs – Unknown base magnification for file
    2020-01-10 10:08:32,637 – ERROR – GO29436_1115_2_390920_HE_280922005.svs: Has unknown or uncalculated base magnification, cannot specify magnification scale: NA! Did you try getMag?
    2020-01-10 10:08:32,640 – ERROR – C:\Users\kayas7\Documents\HistoQC\images\GO29436_1115_2_390920_HE_280922005.svs – – Error analyzing file (skipping): Attribute not found. (“‘int’ object has no attribute ‘shape'”, ‘C:\\Users\\kayas7\\Documents\\HistoQC\\images\\GO29436_1115_2_390920_HE_280922005.svs’, ‘')
    2020-01-10 10:08:34,060 - INFO - ------------Done---------

    2020-01-10 10:08:34,060 - INFO - These images failed (available also in error.log), warnings are listed in warnings column in output:
    2020-01-10 10:08:34,061 - INFO - C:\Users\kayas7\Documents\HistoQC\images\GO29436_1115_2_390920_HE_280922005.svs Attribute not found. ("'int' object has no attribute 'shape'", 'C:\\Users\\kayas7\\Documents\\HistoQC\\images\\GO29436_1115_2_390920_HE_280922005.svs', '
    ')
    Traceback (most recent call last):
    File "qc_pipeline.py", line 263, in
    os.symlink( origin, target, target_is_directory=True)
    OSError: symbolic link privilege not held

      1. I have installed the new requirement files in the link, however I am still getting the same error. My operating system is Windows 10. So, what could the reason be ?

        1. The histoQC is working successfully with svs from http://histoqcrepo.com/ and mrxs, ndpi formats on Windows. It seems like there is something wrong with my svs images.

          The last but least thing is that I am still getting an error on Linux os:
          openslide.lowlevel.OpenSlideError: Unsupported TIFF compression: 7

          I will be openning up an issue on github. Thanks for your quick responses and helps!

    1. Same issue here.

      My quick fix is to run the cmd with admin rights.

      Just run click on the cmd and “run as administrator”

      Everything else is the same

  8. Hi,
    Our lab considers using HistoQC, very interesting software. A few questions
    1. Do you manually have to go through the output data after completed analysis or does the HTML5-based user interface automatically alert you when there are outliers?
    2. Is HistoQC able to in any way modify artefacts and not just detect them?
    3. If and when the scanner needs calibration, does this necessitates recalibration of HistoQC?
    Thanks!

    1. Thank you for your interest and questions!
      1) Yes, the final decision is a subjective one made by the user based on the particular use case. We had made efforts to automate this process but it became very challenging to come up strict definitions which were applicable across all stain types, all organs, and all downstream use cases (e.g., there is a difference between quality which humans need and which algorithms need)
      2) Histoqc only identifies and localizes artifacts such that downstream applications can avoid those regions. There are a number of approaches coming out which may help “fix” the artifacts, but it remains unclear how useful they will be, as they may unintentionally artificially introduce or remove the underlying biological signal, resulting in false positive/negatives
      3) Not sure I understand the last question. Histoqc only produces metrics based on input images, different images from different scanners (or calibrations) will naturally produce different metrics, as intended

  9. Thanks Andrew for making the code available.
    Once artifacts are detected, what is the right way of removing them from images? Overlaying the masks with the original image? Is this already done in any of the output files that are generated?
    If I understood correctly, the original images have been downsampled so the masks would need to be readjusted to the original image size to be able to work again with the ‘clean’ images. Is this correct?

    1. I think you want to the _mask_use.png image, which is a binary image indicating where in the original image is artifact free. this image has the same aspect ratio /proportion as the original image so translating between the two spaces should be trivial. does that answer your question?

  10. Hi Andrew, you mention in the wiki that the config.ini is designed for images with 40x resolution.
    What are the parameters that need to be adapted in config.ini for other resolutions like 20x?
    Thanks!

    1. good question! in fact, in the latest revisions of histoqc, i believe the configuration file will work well for either H&E at either 40x or 20x. there was a prior issue with creating working images that were the magnification, but now the config file accepts magnifications as input as opposed to openslide levels or image sizes, which should result in a fair comparison across images. did you give it a try and encounter any difficulties?

  11. Hi Andrew,

    Thanks for HistoQC it is a great work. I am interested in identifying Blur artifact. However, from the http://histoqcrepo.com/ if I filter artifact section, I do not see any “Blur” category. Would you please help me guide how to get slides with Blur artifact ?

    Thanks,
    Chetan

    1. thanks for your interest! in fact, blurriness is so common, we haven’t uploaded any of those slides. in fact, there are usually small regions within every image which is blurry, due to dust preventing proper focusing or small amounts of tissue not providing a strong enough signal for the focusing algorithms. i would suggest looking at the TCGA, you’ll be able to find lots of images in there : )

  12. Dear Andrew,
    Could you please upload a tutorial for beginners? This software sounds very interesting. I would really like to use this software to assess and compare the quality of slides of my training/test set and study sample.
    Thank you.

  13. Hi, I am doing governmental research on DP.

    May I ask how many seconds it takes for one WSI analysis using HistoQC?

  14. Hi, I’m testing this tool out to see if it would be useful for the QC portion of our digitization workflow. The main artifact I want to identify right now is dust. Using one example from the repository, I can’t figure out how to get it to recognize the huge dust blob. Are you able to offer any tips or guidance on this matter? Thanks!

    1. Yea sure, since dust usually appears as dark spots separated from the tissue, if you tune the “LightDarkModule.getIntensityThresholdPercent:darktissue” section, and associated “MorphologyModule.removeSmallObjects” that should get you almost entirely of the way there. If you have examples that fall outside of that context, please feel free to email them to us

      1. Thank you! I tried this out and was able to get it to identify the dust, but not without also catching a dark tissue area of similar size and brightness. I’ll keep tweaking it and see if I can figure out a way to differentiate between them.

        1. Glad to hear its getting you most of the way there; those must be either some very large pieces of dust or very small pieces of tissue!

  15. Hi Andrew,
    I am was able to run HistoQC on sample SVS files successfully. Now, I have “ome.tiff” image format for my project. I tried HistoQC with this format type; however, it couldn’t recognize the file format.
    Do you have any suggestions on using your software for “ome.tiff” files?
    Thanks!

    1. Thanks for reaching out. Given that openslide is used to read the files, there are two possibilities. one is to convert the file to something which is openslide compatible, for example following this blogpost Converting an existing image into an Openslide compatible format. the other is a bit more hands-on, and would require replacing the WSI reading component with an ome.tiff reader, which although sounding quite complex, is fairly well constrained to the Base Image python class

  16. Hello Andrew,

    Thank you and your colleagues for the work realised with HistoQC!
    I have run HistoQC on TCGA svs images and get results but there is an issue in the rendering of the mask image because there is always a missing part of the image (blacked out). Have you encountered this issue and have any advice for solving it ?

    1. You likely have the wrong pixman library version installed in your base o/s. Can you try the docker file? I suspect the problem will disappear. if needed, you can also take a look at the issues in the histoqc github which discuss (and resolve) this issue. please let me know how it goes

  17. Please, Anyone can help with this error?
    ahmed@DESKTOP-RN9P8SM:/mnt/d/work/HistoQC$ python3.8 -m histoqc -c v2.1 -n 3 “/mnt/d/Work/wsi/out-anon/1/1.mrxs”
    2023-05-04 16:37:33,478 – WARNING – Configuration file v2.1 assuming to be a template…checking.
    2023-05-04 16:37:36,229 – INFO – the pipeline will use these steps:
    2023-05-04 16:37:36,229 – INFO – BasicModule getBasicStats
    2023-05-04 16:37:36,230 – INFO – LightDarkModule saveEqualisedImage
    2023-05-04 16:37:36,230 – INFO – LightDarkModule minimumPixelIntensityNeighborhoodFiltering
    2023-05-04 16:37:36,230 – INFO – LightDarkModule getIntensityThresholdPercent:darktissue
    2023-05-04 16:37:36,230 – INFO – BubbleRegionByRegion detectSmoothness
    2023-05-04 16:37:36,231 – INFO – MorphologyModule removeFatlikeTissue
    2023-05-04 16:37:36,231 – INFO – MorphologyModule fillSmallHoles
    2023-05-04 16:37:36,231 – INFO – MorphologyModule removeSmallObjects
    2023-05-04 16:37:36,231 – INFO – LocalTextureEstimationModule estimateGreyComatrixFeatures:background
    2023-05-04 16:37:36,232 – INFO – BrightContrastModule getContrast:background
    2023-05-04 16:37:36,232 – INFO – BrightContrastModule getBrightnessGray:background
    2023-05-04 16:37:36,232 – INFO – BrightContrastModule getBrightnessByChannelinColorSpace:RGB_background
    2023-05-04 16:37:36,232 – INFO – BlurDetectionModule identifyBlurryRegions
    2023-05-04 16:37:36,233 – INFO – BasicModule finalProcessingSpur
    2023-05-04 16:37:36,233 – INFO – BasicModule finalProcessingArea
    2023-05-04 16:37:36,233 – INFO – HistogramModule compareToTemplates
    2023-05-04 16:37:36,233 – INFO – HistogramModule getHistogram
    2023-05-04 16:37:36,234 – INFO – LocalTextureEstimationModule estimateGreyComatrixFeatures:final
    2023-05-04 16:37:36,234 – INFO – BrightContrastModule getContrast
    2023-05-04 16:37:36,234 – INFO – BrightContrastModule getBrightnessGray
    2023-05-04 16:37:36,234 – INFO – BrightContrastModule getBrightnessByChannelinColorSpace:RGB
    2023-05-04 16:37:36,235 – INFO – BrightContrastModule getBrightnessByChannelinColorSpace:YUV
    2023-05-04 16:37:36,235 – INFO – DeconvolutionModule separateStains
    2023-05-04 16:37:36,235 – INFO – SaveModule saveFinalMask
    2023-05-04 16:37:36,235 – INFO – SaveModule saveMacro
    2023-05-04 16:37:36,236 – INFO – SaveModule saveThumbnails
    2023-05-04 16:37:36,236 – INFO – BasicModule finalComputations
    2023-05-04 16:37:41,107 – INFO – moving fileHandler ‘/mnt/d/work/HistoQC/error.log’ to ‘./histoqc_output_20230504-163733/error.log’
    Traceback (most recent call last):
    File “/usr/local/lib/python3.8/runpy.py”, line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “/usr/local/lib/python3.8/runpy.py”, line 85, in _run_code
    exec(code, run_globals)
    File “/mnt/d/work/HistoQC/histoqc/__main__.py”, line 227, in
    sys.exit(main())
    File “/usr/local/lib/python3.8/contextlib.py”, line 75, in inner
    return func(*args, **kwds)
    File “/mnt/d/work/HistoQC/histoqc/__main__.py”, line 103, in main
    move_logging_file_handler(logging.getLogger(), args.outdir)
    File “/mnt/d/work/HistoQC/histoqc/_pipeline.py”, line 96, in move_logging_file_handler
    new_handler = logging.FileHandler(new_filename, mode=’a’)
    File “/usr/local/lib/python3.8/logging/__init__.py”, line 1143, in __init__
    StreamHandler.__init__(self, self._open())
    File “/usr/local/lib/python3.8/logging/__init__.py”, line 1172, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
    FileNotFoundError: [Errno 2] No such file or directory: ‘/mnt/d/work/HistoQC/histoqc_output_20230504-163733/error.log’

Leave a Reply

Your email address will not be published. Required fields are marked *