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

A constraint that might not be required in PrepSim #113

Open
onahman opened this issue Nov 28, 2022 · 2 comments
Open

A constraint that might not be required in PrepSim #113

onahman opened this issue Nov 28, 2022 · 2 comments

Comments

@onahman
Copy link

onahman commented Nov 28, 2022

I am looking at those lines of code from the file PrepSim:
if (!is.null(min_size)) {
n_cells <- table(x$cluster_id, x$sample_id)
n_cells <- .filter_matrix(n_cells, n = min_size)
if (ncol(n_cells) == 1)
stop("Current 'min_size' retains only 1 sample,\nbut",
" mean-dispersion estimation requires at least 2.")
if (verbose)
message(sprintf("- %s/%s subpopulations and %s/%s samples retained.",
nrow(n_cells), nlevels(x$cluster_id), ncol(n_cells),
nlevels(x$sample_id)))
x <- .filter_sce(x, rownames(n_cells), colnames(n_cells))
}

I think the if (ncol(n_cells) == 1) might not be required, but a check on each row, that there are still more than 1 cell after filtration.
The estimation did work even with only one dataset.
Am I missing something? I am trying to avoid batch effects, and would prefer using only one dataset and not multiple if possible.

@HelenaLC
Copy link
Owner

Hm. The motivation here is that muscat is designed for multi-sample multi-group data, so multiple samples (replicates) are expected. Having only one sample will not allow any of the differential testing functions to work (as there'll be only one sample per group). May I ask what the long-game is here? I.e., are you only interested in the simulation perhaps?

@onahman
Copy link
Author

onahman commented Dec 17, 2022 via email

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