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

Creating h5ad file for SEVtras.ESAI_calculator #37

Open
fusca9 opened this issue Jan 29, 2025 · 1 comment
Open

Creating h5ad file for SEVtras.ESAI_calculator #37

fusca9 opened this issue Jan 29, 2025 · 1 comment

Comments

@fusca9
Copy link

fusca9 commented Jan 29, 2025

Hello respected author. I apologize in advance for the inconvenience. I have the following question:
I have to use SEVtras.ESAI_calculator, one of the input files comes from SEVtras recognizer and the other one should be an h5ad file that has barcodes as indexes and a batch column. I know that i have to use the filtered_feature_bc_matrix.H5 file, i have to convert it in an h5ad file and also add the batch column. But i have 18 samples and so 18 filtered_feature_bc_matrix.H5 files and i think that i have to concatenate the converted files into one single file h5ad. how can i do this? am I on the right track? and how can i eventually manage duplicates indexes during the concatenation? because there are duplicates indexes between the samples.
i want to thank you in advance for your availability.

@RuiqiaoHe
Copy link
Member

Sorry for the delay because I was at the Chinese New Year vocation.
Yes, you are on the right track. You can concatenate the 18 samples with the following code:
import anndata as ad
adata_com = ad.concat([a, b, c, d, e ...., f, i, j, k], label="batch")
adata_com.obs_names_make_unique()
Here, "a, b, c ... i, j, k" are the names of the 18 samples that you have read.

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