I am trying to use the imbalence_score function for my dataset.
As far as I can tell, for the majority of examples you used either the UMAP or tSNE to infer trajectories with slingshot. For my dataset, the PCA projection seems more reasonable.
When I try to run the function, I receive an error however:
# my code
scores <- condiments::imbalance_score(
Object = Embeddings(seurat_subset,"pca_mod")[,1:30] %>% as.matrix(),
conditions = seurat_subset$perturbation,
k = 40, smooth = 30)
Error in array(0, n * k) : negative length vectors are not allowed
In addition: Warning messages:
1: In smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) :
basis dimension, k, increased to minimum possible
2: In array(0, n * k) : NAs introduced by coercion to integer range
I suspect it might be because my input has more than 2 columns because if I just use the first 2 PCs it works fine.
Can I not use the imbalance_score if I have more than 2 dimensions?
I appreciate any insights and am happy to provide the data which produces the error.
Hi,
I am trying to use the
imbalence_score
function for my dataset. As far as I can tell, for the majority of examples you used either the UMAP or tSNE to infer trajectories with slingshot. For my dataset, the PCA projection seems more reasonable. When I try to run the function, I receive an error however:I suspect it might be because my input has more than 2 columns because if I just use the first 2 PCs it works fine.
Can I not use the
imbalance_score
if I have more than 2 dimensions?I appreciate any insights and am happy to provide the data which produces the error.