<p>Hello, 
I am having a hard time opening a very large bedgraph. I have been suggested to split my <a href='http://samtools.sourceforge.net/SAM1.pdf'>bam</a> file by chromosome with chrom-bed.py but it didn't work.
Is there any other alternative?
Thanks,
GP.</p>

<p>I wrote a java tool to split a <strong>BAM</strong> per chromosome see <a href='http://code.google.com/p/jvarkit/wiki/SplitBam'>http://code.google.com/p/jvarkit/wiki/SplitBam</a></p>

<p>It also creates an empty <strong>BAM</strong> (filled with a pair of mock SAMRecords) for each chromosome in the Reference,  if no SAMRecord was found for the chromosome.</p>
