def makeHeader(seqs):
    """
    Make a header for the BAM file given
    a dictionary of sequences and their lengths
    """
    header = { 'HD': {'VN': '1.0'},
            'SQ': [] }

    for seqName in seqs:
        # {'LN': 1575, 'SN': 'chr1'},
        header['SQ'].append({'LN': seqs[seqName], 'SN': seqName })
    
    return header