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 in file(con, "w") : all connections are in use #453

Open
TZUwang opened this issue Apr 30, 2024 · 2 comments
Open

Error in file(con, "w") : all connections are in use #453

TZUwang opened this issue Apr 30, 2024 · 2 comments

Comments

@TZUwang
Copy link

TZUwang commented Apr 30, 2024

HI there
I have encountered some problems and would like to ask for advice.When I run

scenicOptions <- runSCENIC_2_createRegulons(scenicOptions, coexMethod=c("top5perTarget"))
always encounter Error
Error in file(con, "w") : all connections are in use
In addition: Warning message:
In MulticoreParam(nCores) :
MulticoreParam() not supported on Windows, use SnowParam()

I solved it by using this code
closeAllConnections()
but no improvement
what should I do

@Osterzone
Copy link

hello,I see somebody tell the answer in another issue. Hope it works!
#71

@TZUwang
Copy link
Author

TZUwang commented May 21, 2024

Reference
TKX But I have seen this issue and tried to solve it, but it has not been improved. Maybe I have not set it up. This is my code. I want to know where the problem lies.

dermis <- subset(x = age.combined.PC30.r0.25, idents = c("1", "3", "6", "8", "13", "19"))
exprMat <- GetAssayData(dermis_ND0, assay = "RNA", slot = "counts")
exprMat <- as.matrix(exprMat)
mode(exprMat) <- "numeric"
plan(multisession, workers = 1)
scenicOptions <- initializeScenic(org="mgi", dbDir=dbDir, nCores=1)
genesKept <- geneFiltering(exprMat, scenicOptions)
exprMat_filtered <- exprMat[genesKept, ]
runCorrelation(exprMat_filtered, scenicOptions)
exprMat_filtered_log <- log2(exprMat_filtered + 1)
runGenie3(exprMat_filtered_log, scenicOptions)
exprMat_log <- log2(exprMat + 1)
scenicOptions@settings$dbs <- scenicOptions@settings$dbs["10kb"]
scenicOptions <- runSCENIC_1_coexNetwork2modules(scenicOptions)
scenicOptions <- runSCENIC_2_createRegulons(scenicOptions, coexMethod=c("top5perTarget"))
Error in file(con, "w") : all connections are in use

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