X BOL wishing you a very and Happy New year

Alternative content

Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




splitbam: splits a BAM by chromosomes

https://code.google.com/archive/p/jvarkit/wikis/SplitBam.wiki

splitbam splits a BAM by chromosomes.

Using the reference sequence dictionary (*.dict), it also creates some empty BAM files if no sam record was found for a chromosome. A pair of 'mock' SAM-Records can also be added to those empty BAMs to avoid some tools (like samtools) to crash.

Usage

java -jar splitbam.jar -p OUT/__CHROM__/__CHROM__.bam -R ref.fasta (bam|sam|stdin)

Options

  • -h help; This screen.
  • -R (indexed reference file) REQUIRED.
  • -u (unmapped chromosome name): default:Unmapped
  • -e | --empty : generate EMPTY bams for chromosome having no read mapped
  • -m | --mock : if option '-e', add a mock pair of sam records to the empty bam
  • -p (output file/bam pattern) REQUIRED. MUST contain __CHROM__ and end with .bam
  • -s assume input is sorted.
  • -x | --index create index.
  • -t | --tmp (dir) tmp file directory
  • -G (file) chrom-group file (see below)