seurat icon indicating copy to clipboard operation
seurat copied to clipboard

Directory provided does not exist

Open Rahul1711arora opened this issue 2 years ago • 2 comments

Hi,

I have recently generated 10x gene data (matrix, feature and barcodes) stored in a folder named: 'filtered_feature_bc_matrix' located on my desktop. I have been trying to use the prompt so that it is easy for other users. When I do so, I get the following error:

**Error in Read10X(data.dir = readline(prompt = "Enter path for filtered_feature_bc_matrix: ")) : 
  Directory provided does not exist**

The command I am using is: **dataset <- Read10X(data.dir = readline(prompt="Enter path for filtered_feature_bc_matrix: "))** Which outputs the prompt below and I add the path. **Enter path for filtered_feature_bc_matrix: '/Users/rahularora/Desktop/filtered_feature_bc_matrix'**

Now, if I remove the prompt and hard code the same path, the data is read. I am not sure what am I doing wrong? Any assistance would be greatly appreciated. Thanks in advance.

Rahul1711arora avatar Jun 04 '22 11:06 Rahul1711arora

hi @Rahul1711arora When you type in for readline, do you add quotes for the path: 'filtered_feature_bc_matrix' or filtered_feature_bc_matrix? Only filtered_feature_bc_matrix can work.

yuhanH avatar Jun 17 '22 18:06 yuhanH

Hi @yuhanH, thanks for your message. I have tried both ways, with and without quotes. It always seems to give the same error message:

Error in Read10X(data.dir = readline(prompt = "Enter path for filtered_feature_bc_matrix: ")) : 
  Directory provided does not exist

So, I am not sure really what to do in this case.

Apart from this, I also have another query. I have two different datasets for which I performed clustering and annotation individually. I then extracted the same cell type from each dataset and re-clustered them (had to do another round of SCTransform and PCA, tSNE etc.) It gave me very good separated clusters from each dataset. basic_tsne_celltype_clusters So, here you can see that many clusters represent the same cell population in peach and in blue. What I ideally want to do is to collapse these multiple clusters into 1, i.e., there should only be 1 cluster in peach and 1 cluster in blue so that I can perform DEG in two clusters. I have read about merge and integration but that didn't help. I was wondering how this can be achieved? Thanks in advance for your help.

Rahul1711arora avatar Jun 18 '22 10:06 Rahul1711arora

Hi @Rahul1711arora, I don't believe you can use readline to provide input directly into a function like that. Instead, if this is a script, I would recommend running readline first and capturing the output as a variable, then pass that variable into Read10X

data.dir <- readline(prompt = "Enter path for filtered_feature_bc_matrix: ")
dataset <- Read10X(data.dir = data.dir)

mojaveazure avatar Sep 23 '22 19:09 mojaveazure