Seurat: Read10X error: Barcode file missing

Created on 4 Jun 2019  ·  8Comments  ·  Source: satijalab/seurat

Hi,
I would like to use Read10X on mouse bone marrow data available in https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE128423

Yet I got this same error message: Error in Read10X(data_dir) : Barcode file missing

But when I checked, the barcode file was there:

list.files(data_dir)
[1] "GSM3674240_b2.barcodes.tsv" "GSM3674240_b2.genes.tsv"
[3] "GSM3674240_b2.matrix.mtx"

I also checked in the paper, they used "Cellranger toolkit (version 2.0.1, 10X Genomics)". Is it the source of this problem? What should I do to resolve this?

I tried Read10X() with both gzipped and unzipped files, both did not work with same error. FYI, I am using Seurat 3.0

Thanks!

Most helpful comment

Hi @thaocad,

The issue is that the Read10X data expects data files named as they are by the Cell Ranger pipeline (see: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/2.0/output/matrices for the documentation of the output files).

When they uploaded the files they changed the names, so you'll have to convert them back into their original form (e.g. remove GSM3674240_b2. from all the file names). From the documentation of the function, you can see that list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and matrix.mtx, that is the files without the prefix name.

Cheers,
Nigel

All 8 comments

Hi @thaocad,

The issue is that the Read10X data expects data files named as they are by the Cell Ranger pipeline (see: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/2.0/output/matrices for the documentation of the output files).

When they uploaded the files they changed the names, so you'll have to convert them back into their original form (e.g. remove GSM3674240_b2. from all the file names). From the documentation of the function, you can see that list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and matrix.mtx, that is the files without the prefix name.

Cheers,
Nigel

Hi @evolvedmicrobe,
Thank you very much for your prompt reply. It works!!
Best,
Thao

Hi,
I am trying to load raw files using Read 10X command but it says the following error:
Expression matrix file missing. Expecting matrix.mtx

All the file prefixes I removed it and now has the names: barcodes.tsv, genes.tsv, and matrix.mtx

Please help me with this!

Hi @VP0521. Have you solved your issue?

Yes, thanks for the response!

On Mon, Dec 14, 2020 at 4:56 AM bmanzato notifications@github.com wrote:

Hi @VP0521 https://github.com/VP0521. Have you solved your issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/1625#issuecomment-744324301,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARO2SHKYHTUS2ZADZJ3N7BLSUXOODANCNFSM4HSVI4ZA
.

>

Vikrant Piprode, Ph.D
Phone: 717-623-2409

Hi,
I was actually asking because I have the same issue with barcodes.tsv:

library(Seurat)
data_dir <-
"/Users/benedettamanzato/Desktop/smartseq/bus_output_11k_SMARTSEQ/10xread_data"
list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and matrix.mtx
[1] "barcodes.tsv" "features.tsv" "matrix.mtx"
datamatrix <- Read10X(data.dir = data_dir , gene.column = 1)
Error in Read10X(data.dir = data_dir, gene.column = 1) :
Barcode file missing. Expecting barcodes.tsv.gz

Do you remember how you solved it?

Best,
Benedetta

On Mon, Dec 14, 2020 at 11:54 AM VP0521 notifications@github.com wrote:

Yes, thanks for the response!

On Mon, Dec 14, 2020 at 4:56 AM bmanzato notifications@github.com wrote:

Hi @VP0521 https://github.com/VP0521. Have you solved your issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/satijalab/seurat/issues/1625#issuecomment-744324301
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ARO2SHKYHTUS2ZADZJ3N7BLSUXOODANCNFSM4HSVI4ZA

.

>

Vikrant Piprode, Ph.D
Phone: 717-623-2409


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/1625#issuecomment-744358694,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR35ULK6DHF52VYS7KINL4DSUXVGZANCNFSM4HSVI4ZA
.

Hi,
You have to give correct directory to your command:
After you install seurat, pathwork and dplyr

use this commant
sample.data <- Read10X(data.dir = "/file location")

Note: Be careful with the caps and small alphabets also. They all should
match your file directory.

BEST

Vikrant Piprode, Ph.D
Phone: 717-623-2409

On Mon, Dec 14, 2020 at 6:04 AM bmanzato notifications@github.com wrote:

Hi,
I was actually asking because I have the same issue with barcodes.tsv:

library(Seurat)
data_dir <-

"/Users/benedettamanzato/Desktop/smartseq/bus_output_11k_SMARTSEQ/10xread_data"

list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and
matrix.mtx
[1] "barcodes.tsv" "features.tsv" "matrix.mtx"
datamatrix <- Read10X(data.dir = data_dir , gene.column = 1)
Error in Read10X(data.dir = data_dir, gene.column = 1) :
Barcode file missing. Expecting barcodes.tsv.gz

Do you remember how you solved it?

Best,
Benedetta

On Mon, Dec 14, 2020 at 11:54 AM VP0521 notifications@github.com wrote:

Yes, thanks for the response!

On Mon, Dec 14, 2020 at 4:56 AM bmanzato notifications@github.com
wrote:

Hi @VP0521 https://github.com/VP0521. Have you solved your issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/satijalab/seurat/issues/1625#issuecomment-744324301
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/ARO2SHKYHTUS2ZADZJ3N7BLSUXOODANCNFSM4HSVI4ZA
>

.

>

Vikrant Piprode, Ph.D
Phone: 717-623-2409


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/satijalab/seurat/issues/1625#issuecomment-744358694
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AR35ULK6DHF52VYS7KINL4DSUXVGZANCNFSM4HSVI4ZA

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/1625#issuecomment-744364300,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARO2SHJFBBPMGJWIZSEOEITSUXWKLANCNFSM4HSVI4ZA
.

Hi,

thank you for your response. Actually I already solved that problem.

Now I have a new one and don't really know how to solve it:

datamatrix <- Read10X(data.dir = data_dir , gene.column = 1,
unique.features = TRUE)
Error in dimnamesGets(x, value) :
invalid dimnames given for “dgTMatrix” object

Has this happened to you too?

On Mon, Dec 14, 2020 at 5:53 PM VP0521 notifications@github.com wrote:

Hi,
You have to give correct directory to your command:
After you install seurat, pathwork and dplyr

use this commant
sample.data <- Read10X(data.dir = "/file location")

Note: Be careful with the caps and small alphabets also. They all should
match your file directory.

BEST

Vikrant Piprode, Ph.D
Phone: 717-623-2409

On Mon, Dec 14, 2020 at 6:04 AM bmanzato notifications@github.com wrote:

Hi,
I was actually asking because I have the same issue with barcodes.tsv:

library(Seurat)
data_dir <-

"/Users/benedettamanzato/Desktop/smartseq/bus_output_11k_SMARTSEQ/10xread_data"

list.files(data_dir) # Should show barcodes.tsv, genes.tsv, and
matrix.mtx
[1] "barcodes.tsv" "features.tsv" "matrix.mtx"
datamatrix <- Read10X(data.dir = data_dir , gene.column = 1)
Error in Read10X(data.dir = data_dir, gene.column = 1) :
Barcode file missing. Expecting barcodes.tsv.gz

Do you remember how you solved it?

Best,
Benedetta

On Mon, Dec 14, 2020 at 11:54 AM VP0521 notifications@github.com
wrote:

Yes, thanks for the response!

On Mon, Dec 14, 2020 at 4:56 AM bmanzato notifications@github.com
wrote:

Hi @VP0521 https://github.com/VP0521. Have you solved your issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
https://github.com/satijalab/seurat/issues/1625#issuecomment-744324301
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/ARO2SHKYHTUS2ZADZJ3N7BLSUXOODANCNFSM4HSVI4ZA

>

.

>

Vikrant Piprode, Ph.D
Phone: 717-623-2409


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/satijalab/seurat/issues/1625#issuecomment-744358694
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AR35ULK6DHF52VYS7KINL4DSUXVGZANCNFSM4HSVI4ZA
>

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/satijalab/seurat/issues/1625#issuecomment-744364300
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ARO2SHJFBBPMGJWIZSEOEITSUXWKLANCNFSM4HSVI4ZA

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/1625#issuecomment-744570740,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR35ULJLP3Y4FS2IG4CVZU3SUY7KLANCNFSM4HSVI4ZA
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whitleyo picture whitleyo  ·  3Comments

rajasreemenon picture rajasreemenon  ·  3Comments

RuiyangLiu94 picture RuiyangLiu94  ·  3Comments

kathirij picture kathirij  ·  3Comments

GHAStVHenry picture GHAStVHenry  ·  3Comments