-
Notifications
You must be signed in to change notification settings - Fork 13
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
Seurat Custom Functions #270
Comments
I think I got it working:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I want to run clusterExperiment using a custom function. I was wondering if it would be possible to run the Seurat Functions used for clustering? Maybe something like this:
SNN_wrap <- function(inputMatrix, k, pcs = 20, ...) {
pca <- RunPCA(inputMatrix)
snn <- FindNeighbors([email protected][, 1:pcs])
res <- FindClusters(snn$snn, resolution = k)
return(as.numeric(as.character(res[, 1])))
}
SNN <- ClusterFunction(SNN_wrap, inputType = "X", algorithmType = "K",
outputType="vector")
Running the individual Seurat Functions (RunPCA, FindNeighbors, FindClusters) with dummy data works. However, the resolution parameter is not exactly "k" - with integer number of clusters. I get errors when trying to run ClusterFunction.
Would this be possible to integrate Seurat Functions in some way into clusterMany?
Thank you!
The text was updated successfully, but these errors were encountered: