This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Uploading 10x Data into R for Monocle 3

Hi, I am having trouble loading the cell ranger data into R. I am a beginner, so please excuse my lack of knowledge of R and other terminology.

Here is what shows up on my script.

cds <- load_cellranger_data("C:/Users/myname/Downloads/10x_data")
Error in load_cellranger_data("C:/Users/myname/Downloads/10x_data") : 
  Barcode file missing

The exact path to the three files are

C:/Users/myname/Downloads/10x_data/outs/filtered_feature_bc_matrix/GRCh38

UPDATE

I used the load_mm_data method instead and am getting a new message.

cds <- load_mm_data(mat_path = "C:/Users/myname/Downloads/matrix.mtx",
 feature_anno_path = "C:/Users/myname/Downloads/features.tsv",
 cell_anno_path = "C:/Users/myname/Downloads/barcodes.tsv")
'as(<dgTMatrix>, "dgCMatrix")' is deprecated.
Use 'as(., "CsparseMatrix")' instead.
See help("Deprecated") and help("Matrix-deprecated").
Warning message:
In new_cell_data_set(mat, cell_metadata = cell_annotations$metadata,  :
  gene_metadata must contain a column verbatim named 'gene_short_name' for certain functions.

Thank you in advance for your help.

scrna-seq 10x single-cell monocle

1 answer

From monocle documentation:

For load_cellranger_data to find the correct files, you must provide a path to the folder containing the un-modified Cell Ranger 'outs' folder. 
Your file structure should look like: 10x_data/outs/filtered_feature_bc_matrix/ where filtered_feature_bc_matrix contains files features.tsv.gz, barcodes.tsv.gz and matrix.mtx.gz.

Which means that it is expecting to have:

C:/Users/myname/Downloads/10x_data/outs/filtered_feature_bc_matrix/features.tsv.g
C:/Users/myname/Downloads/10x_data/outs/filtered_feature_bc_matrix/barcodes.tsv.g
C:/Users/myname/Downloads/10x_data/outs/filtered_feature_bc_matrix/matrix.tsv.g

If you have

C:/Users/myname/Downloads/10x_data/outs/filtered_feature_bc_matrix/GRCh38

Then there is a problem, as the 3 files are inside GRCh38

To use load_mm_data you need to rename the column with the gene names gene_short_name, as it seems that the function is requiring the use of that name. You can read the reason behing with ?load_mm_data

Log in to answer this question.