GenomeComb
cg bamreorder bamfile resultbamfile referencegenome
Changes the order of the contigs/chromosomes in a bam file
This command changes the order of the contigs/chromosomes in a bam file to that of the given genome reference. It first checks the contigs in each, adapting the names (e.g. 1 to chr1) where needed and checking if sizes match. Contigs without a match, or with matching names but different size are dropped from the bam.
Conversion