Skip to content

sparse coolify #6

@gfudenberg

Description

@gfudenberg

it would be useful to avoid conversion to dense map format, as is currently implemented in coolify()

a new function that takes in polymer simulation outputs (trajectories) and outputs a saved cooler. It should accept a contactFinder() function.

A plausible interface might be:

def coolify_sparse(
    filenames,
    loadFunction,
    cool_uri,
    chrom_dict={},
    binsize=2500,
    chunksize=10000000
    cutoff=5,
    n=8,  # Num threads
    contactFinder=polymer_analyses.calculate_contacts,
    exceptionsToIgnore=[],
    useFmap=False,
):

i.e. current arguments in monomerResolutionContactMap() plus coolify(). Internally this should be able to stream contacts into the cooler (as are done with HiC pairs for cooler).

Ideally loadFunction() could be something that takes GSDs from HOOMD or whatever polychrom used (or text) and grabs the (x,y,z) coordinates of the chromatin monomers. An example of a load function for polychrom hdf5 format is here: https://github.com/open2c/polychrom/blob/320f25e97a27f97253a1e93ff9ef2a9f1dc9fd9b/polychrom/polymerutils.py#L43

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions