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

Error on running form_tensor: "incorrect number of dimensions" #23

Open
SamuelCWJ opened this issue Oct 24, 2023 · 0 comments
Open

Error on running form_tensor: "incorrect number of dimensions" #23

SamuelCWJ opened this issue Oct 24, 2023 · 0 comments

Comments

@SamuelCWJ
Copy link

SamuelCWJ commented Oct 24, 2023

Hi!

Apologies in advance if this turns out to be a silly error... But I can't seem to solve it. Really appreciate some help if possible!

I'm new to this package, and I'm trying to run form_tensor on my seurat object.

I first created a project container as described in the walkthrough.
pbmc_container <- make_new_container(seurat_obj = Seurat_Obj, params=param_list, label_donor_sex = TRUE)

Then I tried form_tensor without changing any of the parameters
pbmc_container <- form_tensor(pbmc_container, donor_min_cells=5,
norm_method='trim', scale_factor=10000,
vargenes_method='norm_var_pvals', vargenes_thresh=.1,
scale_var = TRUE, var_scale_power = 2)

And I keep getting this error at the cleaning data step:
parsing data matrix by cell/tissue type...
cleaning data...
Error in count_data[, which(metadata$donors %in% donors_use)] :
incorrect number of dimensions

I have about 140 samples which I labelled as donors, and about 170 cell types. Some donors have less than 5 cells in a cell type, but all of them have more than 5 cells in total. I've tried changing the dataframe from factor to character, but it doesn't work. Any tips would be much appreciated!

Thank you!

Samuel

PS: I am able to run the code fine using your example data, so I'm not sure what the issue is with my own

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

1 participant