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

Visium_HD errors #218

Open
jwweii opened this issue Oct 6, 2024 · 1 comment
Open

Visium_HD errors #218

jwweii opened this issue Oct 6, 2024 · 1 comment

Comments

@jwweii
Copy link

jwweii commented Oct 6, 2024

I've encountered two issues when using the package:

  1. Missing Sample Prefix in Output Files:
    Our output files do not include a sample prefix, which makes an error when reading the feature_slice.h5. For example, the output looks like this:
├── binned_outputs
│   ├── square_002um
│   ├── square_008um
│   └── square_016um
├── cloupe_008um.cloupe -> binned_outputs/square_008um/cloupe.cloupe
├── feature_slice.h5
├── metrics_summary.csv
├── molecule_info.h5
├── possorted_genome_bam.bam
├── possorted_genome_bam.bam.bai
├── probe_set.csv
├── spatial
│   ├── aligned_fiducials.jpg
│   ├── aligned_tissue_image.jpg
│   ├── cytassist_image.tiff
│   ├── detected_tissue_image.jpg
│   ├── tissue_hires_image.png
│   └── tissue_lowres_image.png
└── web_summary.html

To resolve this, I had to manually modify the file visium_hd.py, line 96, to include the sample prefix by changing the code to:
filename_prefix = f"{dataset_id}_" if dataset_id else "" (I input dataset_id as "" in the argument)

  1. Non-Unique Variable Names:
    I encountered an issue where the variable names in the AnnData object were not unique. This caused conflicts in the downstream analysis. To address this, I added the following line after loading the data with sc.read_10x_h5:
    adata.var_names_make_unique()
@LucaMarconato
Copy link
Member

Hi @jwweii thanks for reporting.

Regarding the empty prefix problem, this has been reported here: #212 and a solution has been developed from one of the user, and should be soon available in a PR.

Regarding the var_names_make_unique(), we are aware of this and indeed calling the function is the way to go. But I understand that this could create confusion, so I will:

  • add a parameter if visium() and visium_hd() to fix the var names by default, but still letting the user disable the renaming.

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