Hi, I am new to R and recently want to replicate a R demo with Seurat. The dataset is downloaded into my PC hard driver with the file name of "pbmc3k_filtered_gene_bc_matrices.tar.gz". I successfully loaded packages of dplyr, Seurat, patchwork which are required to run the code. Then, I tried to load dataset using code: pbmc.data<-Read10X(data.dir="~/R/10x/pbmc3k_filtered_gene_bc_matrices.tar.gz/") and get message "Error in Read10X(data.dir = "~/R/10x/pbmc3k_filtered_gene_bc_matrices.tar.gz/") : Directory provided does not exist. I have changed directory path and get the same error message. Please help. Thanks so much.
You are absolutely right. Thanks so much.
I also have the same problem. I have tried to load the dataset using code: data <- Read10X(data.dir = "GSE162454_RAW"). I received an message error Directory provided does not exist Do you know where I've gone wrong? In the folder is 3 files: features, matrix and barcodes.
Thankyou
Perhaps you are not giving the full path to the folder. I'm not sure, but your problem seems to be different since your
GSE162454_RAW
folder is decompressed. Type the command in Rlist.files("GSE162454_RAW")
to see if you can list the files from the directory where you are trying to import this. If you can list, I cannot figure out the problem. If you can't, it means that the path that you're giving is wrong.António
I'm getting the same error code. What commands do you use to decompress the tar.gz file? Thank you
It depends on the operating system (OS) that you're running.
If you want to decompress a
.tar.gz
folder outsideR
, see the following guide depending on your OS: https://kinsta.com/knowledgebase/unzip-tar-gz/. If you're using Linux, you can do the following in your terminal:tar -xvzf folder.tar.gz
(wherefolder.tar.gz
represents the folder that you want to decompress)If you want to do it from
R
directly for convenience, you can attempt the following - see the youtube video (I never try it myself but it seems straightforward): https://www.youtube.com/watch?v=-7s03AzEvag. The solution relies on the functionuntar()
. It seems that you only need to provide the.tar.gz
folder as input like this:untar("folder.tar.gz")
.I hope this helps.
António