The loadings in my Seurat object's harmony information were generated from PCA using specified features, rather than PCA using variable features as the input. However, downstream analysis, including thebuildReferenceFromSeurat function, uses variable genes. This causes an error when multiplying the matrices t(ref1$loadings) and exp_query_scaled_sync in mapQuery function because their dimensions do not match, which gives
Error in t(ref_obj$loadings) %*% exp_query_scaled_sync :
non-conformable arguments
If I need to use PCA with specified features for downstream analysis, including harmonization, how can I resolve this issue?
The loadings in my Seurat object's harmony information were generated from PCA using specified features, rather than PCA using variable features as the input. However, downstream analysis, including the
buildReferenceFromSeurat
function, uses variable genes. This causes an error when multiplying the matrices t(ref1$loadings) and exp_query_scaled_sync inmapQuery
function because their dimensions do not match, which givesIf I need to use PCA with specified features for downstream analysis, including harmonization, how can I resolve this issue?