This is a test version of Biostars. For the public version, visit https://www.biostars.org.
matrix input to Seurat

If I have a .mtx file (a sparse-matrix with 3 columns), a barcode file, and also a gene-name file, how do I create a sparse Matrix from a 3 column input, then assign row and column names according to barcode and gene names files?

Thanks for the help in advance.

rna-seq r seurat

2 answers

This is exactly what the Read10X() function does. You can also check its source code if you want to replicate it yourself or if your input files are not formatted in the same exact way.

Thank you so much! But when I tried putting all the files into a folder, it says that barcode file is missing. Do you know why might that happen?

Is it named barcodes.tsv? According to the source code, that is the file it is looking for.

Thank you! That is exactly the problem!

Hello Biostars,

Don't forget to follow up on your threads.

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work. Upvote|Bookmark|Accept

Please do the same for your previous posts as well.

Thank you so much! But when I tried putting all the files into a folder, it says that barcode file is missing. Do you know why might that happen?

Log in to answer this question.