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

bug in doubletFinder code when reuse.pANN not FALSE #220

Open
jdrnevich opened this issue Feb 7, 2025 · 0 comments
Open

bug in doubletFinder code when reuse.pANN not FALSE #220

jdrnevich opened this issue Feb 7, 2025 · 0 comments

Comments

@jdrnevich
Copy link

I just installed DoubletFinder today (v2.0.4) and I was trying to walk through the Example codes show on the README (https://github.com/chris-mcginnis-ucsf/DoubletFinder?tab=readme-ov-file#example-code-for-real-world-applications) on my own data, and was fine until this part:

seu_kidney <- doubletFinder(seu_kidney, PCs = 1:10, pN = 0.25, pK = 0.09, nExp = nExp_poi.adj, reuse.pANN = "pANN_0.25_0.09_913", sct = FALSE)
Error in if (reuse.pANN) { : argument is not interpretable as logical

I tried debugging and the error is in the very first line of code where it expects reuse.pANN to either be TRUE/FALSE, not a character vector or FALSE:

debug: {
    if (reuse.pANN) {
        pANN.old <- [email protected][, reuse.pANN]
        classifications <- rep("Singlet", length(pANN.old))
        classifications[order(pANN.old, decreasing = TRUE)[1:nExp]] <- "Doublet"
        [email protected][, paste("DF.classifications", pN, pK, nExp, 
            sep = "_")] <- classifications
        return(seu)
    }

There are several ways to fix this but I'm not sure what approach you'd prefer so I didn't submit a pull request.

Thanks!

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