Skip to content

No “weight” column after merging cooler files #432

@Jiangyuan-Liu

Description

@Jiangyuan-Liu

I am trying to merge cooler files only for 5 and 10kb resolutions. However, the balancing “weight” column in the cooler bin-table disappeared after merging. Does anyone know how to solve this problem? Do I need to redo balancing to this merged mcool file?

Thanks,
Jiangyuan

for res in [10000, 5000]:
        merge_cool = '{}::/resolutions/{}'.format(Merge_cool,res)
        replicate_cool = ['{}::/resolutions/{}'.format(i,res) for i in input_files]
        print(merge_cool)
        cooler.merge_coolers(output_uri = merge_cool,
                             input_uris = replicate_cool,
                             mergebuf = int(20e6),
                             mode="a")
c1 = cooler.Cooler(Merge_cool+'::resolutions/10000')
c2 = cooler.Cooler(Merge_cool+'::resolutions/5000')

c2.bins()[:10] # No weight column
c3 = cooler.Cooler(input_files[0]+'::resolutions/10000')
c3.bins()[:10] # has weight column

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions