Change sample ID in BAM file to cell barcode

Change sample ID in BAM file to cell barcode

0

Hi all.

I have a BAM file from one 10X scRNAseq sample.

I want to try a tool out which was designed for a different type of data.

The input for this tool is the output from samtools mpileup. samtools of course detects only one sample in the bam file.

I can split the BAM file into 1 file per cell using subset-bam from 10X. This will take very long and obviously create a lot of files, but it solves the problem.

I thought that it might be better, if I change the header and the ID tags to refer to the cell barcodes. Then samtools can directly split the reads according to the cell barcodes.

Here I run into problems, since I don’t know how to edit the header and the ID tags for the reads.

Any help would be much appreciated and Thanks a lot in advance.


bam


samtools


barcode


scrna

• 68 views

Read more here: Source link