Extract list of mapped UMIs in cell ranger output
2
0
Entering edit mode
2.0 years ago

Hi everyone, and thanks in advance. I am trying to compare the reads in a sample that are mapping to two different reference genomes. I have all the cell ranger outputs, including the bam files, and I would like to extract the UMIs that are mapping to each. Is this possible, or are the UMIs already removed at this point? Thanks

UMI cellranger RNAseq bam 10X • 830 views
ADD COMMENT
1
Entering edit mode
2.0 years ago

The corrected molecular barcodes are present as a tag in the BAM files in this case: UB.

https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/output/bam

To extract them you should search the forum for how to do this:

How to extract certain tag value by key from sam/bam file?

ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY
1
Entering edit mode
2.0 years ago
ATpoint 85k

That should be the UB:Z: tag in the CellRanger bam file, see this example read, the last column:

A00917:642:H52V3DSX2:4:1105:22761:17832 0       chr1    3038735 255     101M117591N49M  *       0       0       AAGTGAGGCAACAGTGGAGATAGAAACACTAGGAAAGAAATCTGGAACCATAGATGCGAGCATCAGCAACAGAATACAAGAAATGGAAGAGAGAATCTCAGGTGCAGAAGATTCCATAGAGAACATCGGCACAACAATCAAAAAAAAAAA        FFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:F:FFFFFF:FFFF:FFFFFFFFFFFFFFFFFFF,FFFFFFFF,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FF        NH:i:1  HI:i:1  AS:i:146        nM:i:0  RG:Z:1_mapped:0:1:H52V3DSX2:4   RE:A:I  xf:i:0  CR:Z:CTATCCGAGGCCACCT   CY:Z:FFFFFFFFFFFFFFFF   CB:Z:CTATCCGAGGCCACCT-1 UR:Z:CCCGCCCTGCCA       UY:Z:FFFFFFFFFF:F     UB:Z:CCCGCCCTGCCA

Since it happens to be the last column a simple regex splitting the line at 'UB:Z:' and then taking the right-hand part should do fine.

ADD COMMENT

Login before adding your answer.

Traffic: 1660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6