This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Directory provided does not exist

Hello, I don't have problem in reading single sample by the script:

GSM4837523.data <- Read10X(data.dir = "GSM4837523_02dat20190515tisCARconDIS_featurebcmatrixfiltered\\outs\\filtered_feature_bc_matrix")

But when I use the script to read all samples, I encounter the error: Directory provided does not exist.

dirs <- dir("C:\\Users\\nuora\\OneDrive\\Desktop\\GSE159677", full.names = TRUE)
length(dirs)

SRRs <- lapply(dirs, function(dir){
  CreateSeuratObject(counts = Read10X(paste(dir,"GSM4837523_02dat20190515tisCARconDIS_featurebcmatrixfiltered\\outs\\filtered_feature_bc_matrix", sep="/")), project = dir, min.cells = 3, min.features = 200)
})
read10x

You are on windows, don't sep="/", use sep="\\"

Hi Bastien Herve, Thank you for your message. I got the same error.

Error in Read10X(paste(dir, "GSM4837523_02dat20190515tisCARconDIS_featurebcmatrixfiltered\\outs\\filtered_feature_bc_matrix",  : 
  Directory provided does not exist

1 answer

Please consider being acquainted with basic level debugging. If the computer tells you that it cannot find the directory, make sure that the directory exist on your computer, or that the path to that directory is correct.

Put a print in your lapply and check if the directories exist.

Thanks. I deleted the extra file under the directory. Now it works. Have a nice day!!!

Log in to answer this question.