Hi hi,
I wanted to share my experience running SCS on 10x Xenium data - I'm trying to add it to the nf-core spatialxe pipeline ( nf-core/spatialxe#130 ). I found that the default background threshold (stain_bg_threshold=10) does not work well for Xenium data, since almost all pixels have values above 10. This results in no background being detected and the model failing to train properly.
I hope it's fine that I prepared a pull request to adjust for that (#22). Summary of changes:
- Added an argument to the preprocess function called
stain_bg_percentile that allows users to specify a percentile-based adaptive background threshold for stain intensity.
- Added a note in the README and example scripts about using
stain_bg_percentile for Visium/H&E data.
- Clarified that the default threshold is for low-range fluorescence images, and percentile-based thresholding is recommended for H&E.
Please find attached a notebook with my test code Test_SCS2Visium.ipynb and the results as a screenshot:
Let me know if you'd like any further changes. Thanks for maintaining SCS!
Cheers,
Kasia
Hi hi,
I wanted to share my experience running SCS on 10x Xenium data - I'm trying to add it to the nf-core spatialxe pipeline ( nf-core/spatialxe#130 ). I found that the default background threshold (stain_bg_threshold=10) does not work well for Xenium data, since almost all pixels have values above 10. This results in no background being detected and the model failing to train properly.
I hope it's fine that I prepared a pull request to adjust for that (#22). Summary of changes:
stain_bg_percentilethat allows users to specify a percentile-based adaptive background threshold for stain intensity.stain_bg_percentilefor Visium/H&E data.Please find attached a notebook with my test code Test_SCS2Visium.ipynb and the results as a screenshot:
Let me know if you'd like any further changes. Thanks for maintaining SCS!
Cheers,
Kasia