feiyoung / PRECAST

an efficient data integration method for multiple spatial transcriptomics data with non- cluster-relevant effects such as the complex batch effects.
GNU General Public License v3.0
9 stars 3 forks source link

why use aligned embeddings for downstream analyses? #27

Open abraham-abin13 opened 2 weeks ago

abraham-abin13 commented 2 weeks ago

Hi, thank you for your responsiveness as I continue to learn more about the PRECAST package. My question is generally about downstream analyses after running PRECAST. For example, I want to run the conditional SVG analysis.

In the manuscript, you use the aligned embeddings as covariates as input to the SPARK package. (From my understanding, ‘aligned embeddings’ refers to the PCs obtained from house keeping gene expression counts across all samples; in the codebase, it is encoded as “hz.” Please let me know if I am incorrect.)

For your convenience, here are references from the code base and the manuscript that I was referring to:

Here is the code for running the conditional SVG analysis from the manuscript. (PRECAST_Analysis/blob/main/Real_data_analysis/dorsolateral_prefrontal_cortex.R)

spark_brain <- spark.vc(spark_brain, covariates = hZ, lib_size = spark_brain@lib_size,
                          num_core = num_core,  fit.model = 'gaussian', verbose = verbose)

And in the manuscript, “hZ” is first introduced in the Methods section under “Recovery of comparable gene expression matrix.