Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced anndata contains only NaN values for gene expression #10

Open
nrosewick opened this issue Jan 24, 2024 · 2 comments
Open

Enhanced anndata contains only NaN values for gene expression #10

nrosewick opened this issue Jan 24, 2024 · 2 comments

Comments

@nrosewick
Copy link

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

@jianhuupenn
Copy link
Owner

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:
jianhuupenn/SpaGCN#7 (comment)

@nrosewick
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants