seurat
seurat copied to clipboard
Directory provided does not exist
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.
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.
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. 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.
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)