Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder paradigm for constructing CellArrDataset #60

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

jkanche
Copy link
Member

@jkanche jkanche commented Nov 27, 2024

For simple builds,

Simple usage

builder = CellArrDatasetBuilder("path/to/output")
builder.add_data(adata1, "sample1")
builder.add_data(adata2, "sample2")
dataset = builder.build()

With more options

config = BuilderConfig(
    output_path="path/to/output",
    matrix_name="normalized_counts",
    matrix_dtype=np.float32,
    num_threads=4
)

builder = CellArrDatasetBuilder(config)

Add data with metadata

builder.add_data(
    adata1, 
    "sample1",
    sample_metadata={
        "condition": "treatment",
        "batch": "1"
    },
    cell_metadata=cell_meta_df1
)

Set gene metadata

builder.set_gene_metadata(gene_annotations_df)

Build the dataset

dataset = builder.build()

jkanche and others added 30 commits November 21, 2024 18:05
…uerying; updating tests and documentation as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant