How to merge set of bam files into one?

I figured out the answer to this one. I am writing down it here for future me and all other curious people.

import pysam

list_of_bamfiles = [f.bam,f2.bam]

pysam.merge("-f","-o","output.bam",*list_of_bamfile)
# the * before the list unpack the list of arguments

2 hours ago by


mrj

▴

100


Login
before adding your answer.

Read more here: Source link