How to impute the modality (like ATAC) when I only have the other modality (RNA) using a pre-trained MultiVI?

hI, just wondering how to impute the modality (like ATAC) when I only have the other modality (RNA) using a pre-trained MultiVI? If the built-in function does not work for this case, what would the flow I need to pass the RNA data through by using the multi.modules?

Thanks

If you have a pretrained MultiVI model, you can run get_accessibility_estimates with your AnnData with only gene expression counts to get the imputed ATAC values.

Thanks for the reply, but it did not work (the expression AnnData is a held-out set which was not involved in training process).

One thing I would want to try is to pass the input RNA count matrix tensor to the modules. I understand the joint embedding is 1/2*(Z_rna + Z_atac) when we have both modalities, but if the input is single-modal, like X_rna only, to predict the X_atac, we need to put the input data through Encoder_rna and then the Decoder_atac, and in this case since I do not have Z_atac, I was wondering what form of Z_rna should be used as the input of the Decoder_atac? Simply Z_rna or 1/2*Z_rna. Thanks!

Can you explain exactly what went wrong when you tried to pass in your held out AnnData? It should work for AnnDatas not used for training as long as it is formatted in the same way as the input AnnData.

What described is precisely what this function does. Z_rna is used when the accessibility is not present (rather than 1/2 Z_rna).

Also, make sure that your held out anndata is the same shape as the original anndata - as in padding the anndata with a 0 matrix for the chromatin accessibility data.

Thanks for the clarification!