Closed TeodoraTockovska closed 1 year ago
Hey,
You have to chose either tissue_lowres or tissue_hires for the 'imgs' column in the infoTable when running ReadVisiumData. If you want to use another image, you need to provide another column called 'scalefactor' with scale factors. You will need to update the package to use this option.
However, I believe the detected_tissue_image.jpg will not be compatible anyways because the spot coordinates in tissue_positions.csv are only compatible with tissue_hires_image.png. May I ask why you want to use this image? :-)
Cheers, Ludvig
Hi Ludvig! Thank you so much for your quick reply!
I am running an analysis where specific spots on the image (detected_tissue_image.png) are highlighted. Those spots are selected for further analysis instead of performing a ST analysis on the entire tissue. I already finished the analysis entirely using Seurat, but I found your package the other day and I really liked the visualization methods that semla has to offer! I wanted to create some visualizations that I can show my team to compare gene expression profiles between 2 samples by using the MapFeatures function.
Would it be possible to use the image in the future? I think it would be very beneficial if any image from the spatial/ directory could be accessed but I also see that it might not be possible given that the spot coordinates aren't compatible.
Ok I see. Well you can actually make the image compatible if you just crop it and remove the white margins. Haven't tried it myself but I think it should work.
But I'm not planning to implement new functionality to load these other images unless many people want to use it for some reason. You can take any image and modify it a bit in Photoshop (or something similar) and it should work fine in semla, and it'll not take much time at all. If you can come up with a good way to convert the spot coordinates to fit all of these images, I can add this functionality, but right now I don't see a simple solution for it :-) I have never heard anyone using the other images before btw, so I never really thought much about it.
Thanks for your reply! I will try it out and see if I can add that functionality and notify you (if I can figure it out!). Have a great day! :)
By the way, the error that I encountered still stands when loading images that are not the high or low-resolution images. I cropped my image and I still encountered the same issue. Why does that error occur?
Hi @TeodoraTockovska – Thank you for trying out semla! Do you still get errors when loading your images? Otherwise I'll close this issue :)
/Lovisa
Hi @TeodoraTockovska – Thank you for trying out semla! Do you still get errors when loading your images? Otherwise I'll close this issue :)
/Lovisa
Hi Lovisa! I can close this issue. Have a nice day.
Hi! I have run into an error when loading an image. Selma loads the high resolution image for a Seurat object found in the spatial directory (tissue_hires_image.png). However, it does not load the following image for a Seurat object within the spatial directory: detected_tissue_image.jpg. I also converted the image to PNG format but again won't load it.
Below is my error. I believe that the code is breaking at this line: https://github.com/ludvigla/semla/blob/main/R/load_images.R#L78.
The following is my image characteristics:
I noticed that the image values are not being saved in my Staffli object (as shown below).
Do you have advice how I can load my image? Could it be possible that the function isn't detecting that I have a Seurat object? The error is found on line 78 which belongs to LoadImages.default, and not LoadImages.Seurat (https://github.com/ludvigla/semla/blob/main/R/load_images.R#L126).
Thanks in advance!