I am loading cellranger data into seuratobject as following, but it keeps showing Error in
Barcode file missing. Expecting barcodes.tsv.gz
the running code and result:
#clean up your environment
rm(list=ls())
# Load required libraries
library(Seurat)
library(dplyr)
# Load required library for reading Matrix Market files
library(Matrix)
# For output from CellRanger >= 3.0 with multiple data types
data_dir <- 'C:/Users/Administrator/Desktop/10x_raw'
list.files(data_dir) # Should show barcodes.tsv.gz, features.tsv.gz, and matrix.mtx.gz
[1] "GSM7494257_AML16_DX_raw_barcodes.tsv.gz" "GSM7494257_AML16_DX_raw_genes.tsv.gz"
[3] "GSM7494257_AML16_DX_raw_matrix.mtx.gz"
data <- Read10X(data.dir = data_dir)
Error in Read10X(data.dir = data_dir) :
Barcode file missing. Expecting barcodes.tsv.gz
seurat_object = CreateSeuratObject(counts = data$`Gene Expression`)
Error in data$`Gene Expression` :
object of type 'closure' is not subsettable
I am sure this file inside the directory. Dose anyone know what's the issue?
Thanks in advance.
list.files
line demonstrates that the precise files it's looking for are not there. What do you mean by "I am sure this file inside the directory"? Can you show a listing of files in the directory that you are trying to read from? $\endgroup$