TESLA
TESLA copied to clipboard
Enhanced anndata contains only NaN values for gene expression
I followed the tutorial using in-house 10X Visium data. I used filtered_feature_bc_matrix.h5, tissue_positions.csv and tissue_hires_image.png as input for Tesla. Countour detection works well using cnt=tesla.cv2_detect_contour(img, apertureSize=5,L2gradient = True)
.
I proceed to the imputation
enhanced_exp_adata=tesla.imputation(img=img, raw=counts, cnt=cnt, genes=counts.var.index.tolist(), shape="none", res=res, s=1, k=2, num_nbs=10
)
and when I check the enhanced_exp_adata.X
all values are nan
Any idea how to solve this ?
Thank you
Thanks for your interest in TESLA. I would recommend you double-check if you are using the correct image, which matches the pixel_x and pixel_y coordinates. If the coordinates do not match, you will get "nan" for the colour values, and the enhanced expression becomes "nan".
I have helped other people solve the same problem on GitHub: https://github.com/jianhuupenn/SpaGCN/issues/7#issuecomment-962761985
Thank you for your prompt reply.
It was indeed an issue with the matching between pixel_x, y and array_x, y. I had to use the scalefactor provided by 10X spaceranger to have good match for pixels. Nevertheless will TESLA work smoothly with the tissue_hires_image.png generated by 10X spaceranger ( a downsampling image of the input file given to spaceranger).
Thank you
hello! Could u tell me how to use 10X spaceranger to match pixels and arrays?I meet the NAN issue too when i use the tissue_hires_image.png to do this. Thanks