# BAM to gene expression matrix (UMI counts per gene per cell),10X

I am trying to reproduce some results of a scRNASeq experiment. However I am new to the server-side aspect of such analyses and am very confused at the moment.

The data provided by the authors of the paper is in .BAM format and from there I wish to derive a gene expression matrix (UMI counts per gene per cell). The authors stated that they did this using the 10X genomics pipeline, however it seems that .BAM outputs are sort of the "final version" of the pipeline and, the pipeline only really deals with truly raw sequencing files (bcl/fastq).

I have considered converting it back to fastq format and following the pipeline from the beginning, but it just seems like I would be moving backwards by doing such.

I have also found some R packages that can integrate BAM files in the environment like Rsamtools, but I would much rather do this on the server and then upload a csv into R for the downstream analysis as the files are +60GB each.

Essentially I am just asking for some advice, or a vignette/article I can read that would clear up how to proceed with the BAM outputs to derive the gene expression data. I have already read the cellranger pages on the 10X genomics website but they were of no help in answering this quesion.

Thank you for your time,

• You might just email the authors. They just uploaded the BAM files because that's the easiest thing to do. CellRanger produces 3 files that describe the counts (they're in "matrix market format") and presumably they can just email them to you. – Devon Ryan Feb 22 '19 at 7:44
• Thanks Devon for your reply. Thing is though, I am trying to learn how to do all this processing myself as I will need to eventually. Unfortunately, most of the documents I have read end up making me more confused. I know BAM files are technically already processed and aligned but, how would I get the counts from the file? – h3ab74 Feb 25 '19 at 15:11
• If you're going to use cell ranger anyway then this isn't something you have to bother learning how to do, it's done by cell ranger internally. – Devon Ryan Feb 25 '19 at 15:14
• If you accept using other tools than those that the authors mention, one that can get you from a bam file to counts is featureCounts (bioinf.wehi.edu.au/featureCounts). You would also need an annotation file in gtf format. – bli Feb 25 '19 at 15:25
• @DevonRyan thanks for clearing that up, I get what you are saying now as well as your earlier comment. I will probably just contact the authors directly. – h3ab74 Feb 25 '19 at 15:43