uchrom.io¶
I/O helpers with lazy optional-dependency imports.
- uchrom.io.create_contacts_from_pairs(df, particles, min_skip=2)¶
Count contacts between all particles.
- uchrom.io.create_particles_from_cool(df, particle_size, prev_particles=None, random_seed=0, max_radius=10, *, min_label='start1', max_label='end2')¶
- uchrom.io.create_particles_from_pairs(df, particle_size, prev_particles=None, random_seed=0, max_radius=10, *, min_label='pos1', max_label='pos2')¶
- uchrom.io.read_particles(path)[source]¶
Read reconstruction output. Auto-detects format by extension.
.h5cd→ ChromData HDF5 (returned as flat DataFrame).csvor other → CSV
- uchrom.io.save_particles(df, path, cell_id=None)[source]¶
Save reconstruction output. Default format is
.h5cd(ChromData).Format inferred from file extension:
.csv→ CSV viadf.to_csv.h5cdor other → ChromData HDF5 (default)
cell_idis only propagated into the.h5cdbranch (CSV has no dedicated cell column). When writing.h5cdit is passed through toChromData.from_dataframe().