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

Warning message when duplicated samples #90

Open
shikhanayar opened this issue Sep 29, 2023 · 8 comments
Open

Warning message when duplicated samples #90

shikhanayar opened this issue Sep 29, 2023 · 8 comments

Comments

@shikhanayar
Copy link

Hi, using scCOMP for the first time; the issue I'm running into is that for some reason cell_group and sample calling are not working appropriately from a Seurat object when running scCOMP.

Here is the code (contrasts have been pre-defined):

results1 <- seurat |> sccomp_glm( formula_composition = ~ 0 + disease_inflammation_response, contrasts = contrasts, .sample = sample, .cell_group = cell_type, bimodal_mean_variability_association = TRUE )

Here is the error message:

sccomp says: outlier identification first pass - step 1/3
Joining with by = join_by(sample)Joining with by = join_by(cell_group)error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
error occurred during calling the sampler; sampling not done
here are whatever error messages were returned
[[1]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

[[2]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

[[3]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

[[4]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

[[5]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

[[6]]
Stan model 'glm_multi_beta_binomial' does not contain samples.

Error in draws[, draws_colnames, drop = FALSE] :
no 'dimnames' attribute for array

Any help would be great.
Thanks!

@stemangiola
Copy link
Collaborator

Hello @shikhanayar,

can you send me a minimal object, anonymised if needed, so I can test it?

@shikhanayar
Copy link
Author

shikhanayar commented Oct 3, 2023

Thanks for your reply @stemangiola . I was able to resolve the above issue (I think that there was an issue in my samples column).

@stemangiola
Copy link
Collaborator

Thanks for your reply @stemangiola . I was able to resolve the above issue (I think that there was an issue in my samples column).

Great, however, knowing your specific case would help me create a warning that would leave users less confused if this happens.

@shikhanayar
Copy link
Author

For sure, I believe that some of the sample rows were duplicated, so when creating a dataframe of cell type and samples, there weren't complete distinct values. Follow-up question -- are there scenarios you have seen where 2D plots were not computed by plots<- plot_summary(results)?

@stemangiola stemangiola changed the title Warning message when running sccomp_glm (sample call error) Warning message when duplicated samples Oct 4, 2023
@stemangiola
Copy link
Collaborator

are there scenarios you have seen where 2D plots were not computed by plots<- plot_summary(results)?

Can you be more elaborate more?

@shikhanayar
Copy link
Author

Sorry, when I run the above function using the results dataframe, the only plots generated are boxplot and credible_intervals_1D. In your vignette, I also see the credible_intervals_2D plot but I'm not seeing that here.

@stemangiola
Copy link
Collaborator

I am refactoring the plots in a new release. 1d vs 2d depends on how you model the variability.

I will keep you posted.

@stemangiola
Copy link
Collaborator

Can you please reinstall from github and let me know?

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

2 participants