Skip to content

correct way to reinstantiate objects? #15

@cafletezbrant

Description

@cafletezbrant

Hi @zouter @OlgaPushkarev @Victor-fe @VincentGardeux @dav-pav ,

Sorry for the flood of questions.

This is the general case of #9 - what is the right way to load an object of class Flow (https://github.com/DeplanckeLab/ChromatinHD/blob/b3535641c8fab52e8d82cd11ff8898f0c024c97c/src/chromatinhd/flow/flow.py) after exiting a Python session?

It seems that the Regions, Transcriptome and Fragments objects I created (this last took 5 hours for chd.data.Fragments.from_fragments_tsv with my 70GB data) were completely deleted when I tried to reload in a new Python session. There is no clear example in your quickstart, guides. Here's what I tried, based on seeing that chd.models.pred.model.multiscale.Models has an argument reset:

## save_dir is the local directory where my data should be saved
fragments = chd.data.Fragments(save_dir / "fragments", reset=False)
folds = chd.data.folds.Folds(save_dir / "folds" / "5x1", reset=False)
transcriptome = chd.data.Transcriptome(save_dir / "transcriptome", reset=False)

However, this did not work as now my fragments directory is empty.

Please advise,
Kipper Fletez-Brant

Metadata

Metadata

Assignees

No one assigned

    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