diff --git a/genindex.html b/genindex.html index b4e3c20..355427b 100644 --- a/genindex.html +++ b/genindex.html @@ -101,8 +101,12 @@

C

@@ -124,31 +128,67 @@

E

F

@@ -171,11 +215,17 @@

G

-
  • Module contents
  • +
  • Module contents +
  • diff --git a/objects.inv b/objects.inv index 876c116..983ca0d 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/regdiffusion.html b/regdiffusion.html index ec97a7d..86c34f5 100644 --- a/regdiffusion.html +++ b/regdiffusion.html @@ -104,7 +104,52 @@
  • power_beta_schedule()
  • -
  • Module contents
  • +
  • Module contents +
  • @@ -235,9 +280,9 @@

    Submodulesobject

    A Object to save and analyze gene regulatory network

    A GRN object includes the adjacency matrix between transcriptional factors -(|a|) and target genes (|b|). The adjacency matrix is expected to be in the -shape of |a| * |b|. In many cases, when TFs are not specified, we have a -square-shaped (|b| * |b|) adjacency matrix. We expected the adjacency +(|a|) and target genes (|b|). The adjacency matrix is expected to be in the +shape of |a| * |b|. In many cases, when TFs are not specified, we have a +square-shaped (|b| * |b|) adjacency matrix. We expected the adjacency matrix to hold predicted weights/probabilities for the edges (float).

    To create a GRN object, you need at least two things: the adjacency matrix and the corresponding gene names. You can further specify the TF names if @@ -613,6 +658,397 @@

    Submodules

    Module contents

    Single-cell Gene Regulatory Networks Inference and Analytics

    +
    +
    +class regdiffusion.GRN(adj_matrix: ndarray, gene_names: ndarray, tf_names: ndarray | None = None, top_gene_percentile: int | None = None)[source]
    +

    Bases: object

    +

    A Object to save and analyze gene regulatory network

    +

    A GRN object includes the adjacency matrix between transcriptional factors +(|a|) and target genes (|b|). The adjacency matrix is expected to be in the +shape of |a| * |b|. In many cases, when TFs are not specified, we have a +square-shaped (|b| * |b|) adjacency matrix. We expected the adjacency +matrix to hold predicted weights/probabilities for the edges (float).

    +

    To create a GRN object, you need at least two things: the adjacency matrix +and the corresponding gene names. You can further specify the TF names if +your adjacency matrix is not a square matrix.

    +

    You can save a GRN object to the HDF5 format using the .to_hdf5 method in +the GRN class. You can load a saved GRN object using the read_hdf5 +function in this package.

    +

    If your adjacency matrix is very large and space is a concern, you may +consider provide a value for top_gene_percentile. This value will +calculate the a cutoff point for the values in the adjacency matrix. +Every value whose absolute value is below this cutoff point will be set to +zero. Later on, we can save the data as a sparse matrix to reduce the +space requirement.

    +

    The GRN object comes with many useful methods to analyze and visualize the +network. Top top-level interfaces includes .extract_node_2hop_neighborhood +and .visualize_local_neighborhood.

    +
    +
    Parameters:
    +
      +
    • adj_matrix (np.ndarray) – A 2D adjacency matrix to save.

    • +
    • gene_names (np.ndarray) – A 1D numpy array with all the target gene +names.

    • +
    • tf_names (np.ndarray, optional) – A 1D numpy array with all the TF gene +names.

    • +
    • top_gene_percentile (int) – If this value is set, only the top k absolute +values in the adjacency matrix will be kept. All the other values +will be set to zero.

    • +
    +
    +
    +
    +
    +extract_node_2hop_neighborhood(genes: str | List[str], k: int = 20) DataFrame[source]
    +

    Generate a pandas dataframe for the local neighborhood (2-hop) around +selected gene(s).

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_neighbors(gene: str, k: int = 20) DataFrame[source]
    +

    Generate a pandas dataframe for the top direct neighbors of selected +gene. The dataframe will be sorted by the absolute weight of edges.

    +

    The dataframe will have 3 columns: source, target, weight.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_neighbors_as_indices(gene: str, k: int = 20) Dict[source]
    +

    Generate a dictionary for the top direct neighbors of selected gene. +It is slightly faster than the dataframe version.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_sources(gene: str, k: int = 20) DataFrame[source]
    +

    Generate a pandas dataframe for the top direct edge pointing to the +selected gene.

    +

    The dataframe will have 3 columns: source, target, weight.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_sources_as_indices(gene: str, k: int = 20) Dict[source]
    +

    Generate a dictionary for the top direct edge pointing to the +selected gene. It is slightly faster than the dataframe version.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_targets(gene: str, k: int = 20) DataFrame[source]
    +

    Generate a pandas dataframe for the top direct edge pointing from the +selected gene.

    +

    The dataframe will have 3 columns: source, target, weight.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +extract_node_targets_as_indices(gene: str, k: int = 20) Dict[source]
    +

    Generate a dictionary for the top direct edge pointing from the +selected gene. It is slightly faster than the dataframe version.

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    +
    +
    +
    + +
    +
    +generate_adj_list() DataFrame[source]
    +

    Simply generate a dataframe to hold the adjacency list.

    +

    The dataframe will have 3 columns: source, target, weight.

    +
    + +
    +
    +to_hdf5(file_path: str, as_sparse: bool = False)[source]
    +

    Save GRN into a HDF5 file. You have the option to save as a sparse +matrix. This option is preferred when most of the values in the +adjacency matrix are zeros.

    +
    +
    Parameters:
    +
      +
    • file_path (str) – File path to save.

    • +
    • as_sparse (bool) – Whether to save as sparse matrix

    • +
    +
    +
    +
    + +
    +
    +visualize_local_neighborhood(genes: str | List[str], k: int = 20, node_size: int = 8, edge_widths: List[int] = [2, 1, 0.5], font_size: int = 30, node_group_dict: Dict | None = None, cdn_resources: str = 'remote', notebook: bool = True)[source]
    +

    Generate a vis.js network visualization of the local neighborhood +(2-hop) around selected gene(s).

    +
    +
    Parameters:
    +
      +
    • genes (str, List(str)) – A single gene or a list of genes to inspect.

    • +
    • k (int) – Top-k edges to inspect on each node.

    • +
    • node_size (int) – The size of nodes in the visualization.

    • +
    • edge_widths (List) – The widths for edges (1st, 2nd, between 2nd +hops).

    • +
    • font_size (int) – The font size for nodes labels.

    • +
    • node_group_dict (dict) – A dictionary with keys being the names of +genes and values being the groups. Genes from the same group +will be colored using the same color.

    • +
    • cdn_resources (str) – Where to load vis.js resources. Default is +‘remote’.

    • +
    • notebook (bool) – Boolean value indicating whether the visualization +happens in a jupyter notebook.

    • +
    +
    +
    +
    + +
    + +
    +
    +class regdiffusion.GRNEvaluator(ground_truth, gene_names, metrics=['AUROC', 'AUPR', 'AUPRR', 'EP', 'EPR'])[source]
    +

    Bases: object

    +

    A generalized evaluator for GRN inference.

    +
    +
    Parameters:
    +
      +
    • ground_truth (np.ndarray or list) – Either a 2D numpy array or list of +list holding the ground truth. Each row is an edge and includes +names for the source and target nodes. For example, [[‘A’, ‘B’], +[‘B’, ‘C’]].

    • +
    • gene_names (np.ndarray or list) – Either a 1D numpy array or list of +gene names. Make sure the order of the gene names is the same as +the order of gene names in the adjacency matrix.

    • +
    • metrics (list) – A list of supported evaluation metrics. Currently +support ‘AUROC’, ‘AUPR’, ‘AUPRR’, ‘EP’, ‘EPR’.

    • +
    +
    +
    +
    +
    +evaluate(A)[source]
    +
    + +
    + +
    +
    +class regdiffusion.LightLogger(result_dir='result_logs', log_date=None)[source]
    +

    Bases: object

    +

    A lightweight logger that runs completely in local

    +

    This logger takes inspirations from w&b but runs completely in local +environment. Also, it supports logging multiple separated runs in +a single experiment.

    +
    +
    Parameters:
    +
      +
    • result_dir (str) – Path to the dir to save all the logging files

    • +
    • log_date (str) – Within result_dir, logs from each date will be saved in each +subdirectory. This log_date variable provides a way to customize +this setting

    • +
    +
    +
    +
    +
    +set_configs(configs)[source]
    +

    Save experiment configurations (a python dictionary) to memory for +future exportation

    +
    + +
    +
    +start(note=None)[source]
    +

    Start the logging of a new run within an experiment

    +
    + +
    +
    +log(log_dict, step=None)[source]
    +

    Log log_dict (a dictionary containing performance) at each step

    +
    + +
    +
    +finish(save_now=True)[source]
    +

    End the logging of a run and save to a local file if save_now is +True

    +
    + +
    +
    +to_df(tidy=True)[source]
    +

    Convert saved logs to a pandas dataframe

    +
    + +
    +
    +save(path)[source]
    +

    Save all the logs to path

    +
    + +
    +
    +check_early_stopping(item, k=10)[source]
    +
    + +
    +
    +finish(save_now=True)[source]
    +
    + +
    +
    +log(log_dict, step=None)[source]
    +
    + +
    +
    +save(path)[source]
    +
    + +
    +
    +set_configs(configs)[source]
    +
    + +
    +
    +start(note=None)[source]
    +
    + +
    +
    +to_df(tidy=True)[source]
    +
    + +
    + +
    +
    +class regdiffusion.RegDiffusionTrainer(exp_array, cell_types=None, evaluator=None, logger=None, device='cuda', T=5000, start_noise=0.0001, end_noise=0.02, lr_nn=0.001, lr_adj=None, weight_decay_nn=0.1, weight_decay_adj=0.01, sparse_loss_coef=0.25, adj_dropout=0.3, batch_size=128, n_steps=1000, train_split=1.0, train_split_seed=123, eval_on_n_steps=100, time_dim=64, celltype_dim=4, hidden_dims=[16, 16, 16], init_coef=5, top_gene_percentile=5, compile=False)[source]
    +

    Bases: object

    +

    Initialize and Train a RegDiffusion model with configs

    +
    +
    +forward_pass(x_0, t)[source]
    +

    Forward diffusion pass

    +
    +
    Parameters:
    +
      +
    • x_0 (torch.FloatTensor) – Torch tensor for expression data. Rows are cells and columns +are genes

    • +
    • t (torch.LongTensor) – Torch tensor for time steps.

    • +
    • mean_schedule (torch.FloatTensor) – Torch tensor for diffusion mean schedule

    • +
    • std_schedule (torch.FloatTensor) – Torch tensor for diffusion std schedule

    • +
    +
    +
    +
    + +
    +
    +get_adj()[source]
    +
    + +
    +
    +get_grn(gene_names, tf_names=None, top_gene_percentile=None)[source]
    +
    + +
    +
    +train(n_steps=None)[source]
    +
    + +
    +
    +training_curves()[source]
    +
    + +
    + +
    +
    +regdiffusion.load_logger(path)[source]
    +

    Load a saved log file to a LightLogger object

    +
    +
    Parameters:
    +

    path (str) – path to the json file generated by LightLogger.save.

    +
    +
    +
    + +
    +
    +regdiffusion.read_hdf5(file_path: str)[source]
    +

    Read HDF5 file as a GRN object. See the documentation for GRN for details.

    +
    +
    Parameters:
    +

    file_path (str) – File path to read.

    +
    +
    +
    + diff --git a/searchindex.js b/searchindex.js index c183d35..c1900d5 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "modules", "regdiffusion", "regdiffusion.data", "regdiffusion.models"], "filenames": ["index.rst", "modules.rst", "regdiffusion.rst", "regdiffusion.data.rst", "regdiffusion.models.rst"], "titles": ["Welcome to regdiffusion\u2019s documentation!", "regdiffusion", "regdiffusion package", "regdiffusion.data package", "regdiffusion.models package"], "terms": {"index": 0, "modul": [0, 1], "search": 0, "page": 0, "packag": 1, "subpackag": 1, "data": [1, 2], "submodul": 1, "beelin": [1, 2], "microglia": [1, 2], "util": [1, 2], "content": 1, "model": [1, 2], "evalu": 1, "grnevalu": [1, 2], "grn": 1, "extract_node_2hop_neighborhood": [1, 2], "extract_node_neighbor": [1, 2], "extract_node_neighbors_as_indic": [1, 2], "extract_node_sourc": [1, 2], "extract_node_sources_as_indic": [1, 2], "extract_node_target": [1, 2], "extract_node_targets_as_indic": [1, 2], "generate_adj_list": [1, 2], "to_hdf5": [1, 2], "visualize_local_neighborhood": [1, 2], "read_hdf5": [1, 2], "logger": 1, "lightlogg": [1, 2], "set_config": [1, 2], "start": [1, 2], "log": [1, 2, 3], "finish": [1, 2], "to_df": [1, 2], "save": [1, 2], "check_early_stop": [1, 2], "load_logg": [1, 2], "trainer": 1, "regdiffusiontrain": [1, 2], "forward_pass": [1, 2], "get_adj": [1, 2, 4], "get_grn": [1, 2], "train": [1, 2, 4], "training_curv": [1, 2], "linear_beta_schedul": [1, 2], "power_beta_schedul": [1, 2], "cell_type_separ": [2, 3], "download_beelin": [2, 3], "load_beelin": [2, 3], "load_beeline_ground_truth": [2, 3], "download_regdiffusion_data": [2, 3], "load_atlas_microglia": [2, 3], "load_hammond_microglia": [2, 3], "download_fil": [2, 3], "block": [2, 4], "forward": [2, 4], "geneembed": [2, 4], "i_minus_a": [2, 4], "get_adj_": [2, 4], "get_gene_emb": [2, 4], "get_sampled_adj_": [2, 4], "soft_threshold": [2, 4], "sinusoidalpositionembed": [2, 4], "class": [2, 4], "ground_truth": 2, "gene_nam": 2, "metric": 2, "auroc": 2, "aupr": 2, "auprr": 2, "ep": 2, "epr": 2, "sourc": [2, 3, 4], "base": [2, 4], "object": 2, "A": [2, 4], "gener": 2, "infer": [2, 4], "paramet": [2, 3, 4], "np": 2, "ndarrai": 2, "list": [2, 4], "either": [2, 3], "2d": 2, "numpi": 2, "arrai": 2, "hold": 2, "ground": [2, 3], "truth": [2, 3], "each": 2, "row": [2, 3], "i": [2, 3, 4], "an": 2, "edg": 2, "includ": 2, "name": 2, "target": 2, "node": 2, "For": [2, 4], "exampl": 2, "b": 2, "c": 2, "1d": 2, "gene": [2, 3, 4], "make": 2, "sure": 2, "order": 2, "same": 2, "adjac": [2, 4], "matrix": [2, 4], "support": 2, "current": 2, "adj_matrix": 2, "tf_name": 2, "none": [2, 4], "top_gene_percentil": 2, "int": [2, 4], "analyz": 2, "regulatori": 2, "network": 2, "between": [2, 4], "transcript": 2, "factor": 2, "The": [2, 4], "expect": [2, 4], "shape": 2, "In": 2, "mani": 2, "case": 2, "when": 2, "tf": 2, "ar": [2, 4], "specifi": [2, 4], "we": [2, 3], "have": 2, "squar": 2, "predict": 2, "weight": 2, "probabl": 2, "float": [2, 4], "To": 2, "creat": 2, "you": 2, "need": [2, 4], "least": 2, "two": 2, "thing": 2, "correspond": [2, 3], "can": 2, "further": 2, "your": 2, "hdf5": 2, "format": 2, "us": [2, 4], "method": 2, "load": [2, 3], "function": [2, 4], "thi": [2, 4], "If": [2, 3, 4], "veri": 2, "larg": 2, "space": 2, "concern": 2, "mai": 2, "consid": 2, "provid": [2, 4], "valu": [2, 4], "calcul": 2, "cutoff": 2, "point": 2, "everi": [2, 4], "whose": 2, "absolut": 2, "below": 2, "set": [2, 3], "zero": 2, "later": 2, "spars": 2, "reduc": 2, "requir": 2, "come": 2, "visual": 2, "top": 2, "level": 2, "interfac": 2, "all": [2, 4], "option": 2, "onli": [2, 3], "k": 2, "kept": 2, "other": 2, "str": [2, 3], "20": 2, "datafram": 2, "panda": 2, "local": 2, "neighborhood": 2, "2": 2, "hop": 2, "around": 2, "select": [2, 3], "": 2, "singl": [2, 3, 4], "inspect": 2, "node_s": 2, "size": [2, 4], "direct": 2, "neighbor": 2, "sort": 2, "3": [2, 4], "column": [2, 3], "dict": 2, "dictionari": 2, "It": 2, "slightli": 2, "faster": 2, "than": 2, "version": 2, "from": [2, 3, 4], "simpli": 2, "file_path": [2, 3], "as_spars": 2, "bool": 2, "fals": 2, "file": 2, "prefer": 2, "most": 2, "path": 2, "whether": 2, "8": 2, "edge_width": 2, "1": [2, 4], "0": [2, 3, 4], "5": [2, 4], "font_siz": 2, "30": 2, "node_group_dict": 2, "cdn_resourc": 2, "remot": 2, "notebook": 2, "true": [2, 3], "vi": 2, "j": 2, "width": 2, "1st": 2, "2nd": 2, "font": 2, "label": 2, "kei": 2, "being": 2, "group": 2, "color": 2, "where": [2, 3], "resourc": 2, "default": [2, 4], "boolean": 2, "indic": 2, "happen": 2, "jupyt": 2, "read": 2, "see": 2, "document": 2, "detail": [2, 4], "result_dir": 2, "result_log": 2, "log_dat": 2, "lightweight": 2, "run": [2, 4], "complet": 2, "take": [2, 4], "inspir": 2, "w": 2, "environ": 2, "also": 2, "multipl": 2, "separ": 2, "experi": 2, "dir": 2, "within": [2, 4], "date": 2, "subdirectori": 2, "variabl": 2, "wai": 2, "custom": 2, "config": 2, "configur": 2, "python": 2, "memori": [2, 3], "futur": 2, "export": 2, "note": 2, "new": 2, "log_dict": 2, "step": [2, 3, 4], "contain": 2, "perform": [2, 4], "save_now": 2, "end": [2, 3], "tidi": 2, "convert": 2, "item": 2, "10": 2, "json": 2, "exp_arrai": 2, "cell_typ": 2, "devic": 2, "cuda": 2, "t": [2, 4], "5000": 2, "start_nois": 2, "0001": 2, "end_nois": 2, "02": 2, "lr_nn": 2, "001": 2, "lr_adj": 2, "weight_decay_nn": 2, "weight_decay_adj": 2, "01": 2, "sparse_loss_coef": 2, "25": 2, "adj_dropout": [2, 4], "batch_siz": 2, "128": 2, "n_step": 2, "1000": 2, "train_split": 2, "train_split_se": 2, "123": 2, "eval_on_n_step": 2, "100": 2, "time_dim": [2, 4], "64": 2, "celltype_dim": [2, 4], "4": [2, 3, 4], "hidden_dim": [2, 4], "16": [2, 4], "init_coef": [2, 4], "compil": 2, "initi": [2, 4], "x_0": 2, "diffus": [2, 4], "pass": [2, 4], "torch": 2, "floattensor": 2, "tensor": 2, "express": 2, "cell": [2, 3, 4], "longtensor": 2, "time": [2, 4], "mean_schedul": 2, "mean": 2, "schedul": 2, "std_schedul": 2, "std": 2, "timestep": 2, "power": 2, "analyt": 2, "sc_data": 3, "cell_type_element_indic": 3, "sep": 3, "_": 3, "save_dir": 3, "remove_zip": 3, "data_dir": 3, "benchmark_data": 3, "hesc": 3, "benchmark_set": 3, "500_string": 3, "download": 3, "necessari": 3, "root": 3, "folder": 3, "locat": 3, "benchmark": 3, "dataset": 3, "choos": 3, "among": 3, "hhep": 3, "mdc": 3, "mesc": 3, "mhsc": 3, "gm": 3, "l": 3, "1000_string": 3, "500_non": 3, "chip": 3, "1000_non": 3, "500_chip": 3, "seq": 3, "1000_chip": 3, "500_lofgof": 3, "1000_lofgof": 3, "lofgof": 3, "avail": 3, "return": 3, "first": [3, 4], "element": 3, "scanpi": 3, "second": 3, "type": [3, 4], "tupl": 3, "file_nam": 3, "scp795": 3, "http": 3, "singlecel": 3, "broadinstitut": 3, "org": 3, "single_cel": 3, "studi": 3, "transcriptom": 3, "atla": 3, "mous": 3, "cerebellum": 3, "summari": 3, "just": 3, "count": 3, "ha": 3, "been": 3, "transform": 3, "hammond": 3, "p100": 3, "male": 3, "mice": 3, "url": 3, "chunk_siz": 3, "1024": 3, "in_dim": 4, "out_dim": 4, "x": 4, "ct": 4, "defin": 4, "comput": 4, "call": 4, "should": 4, "overridden": 4, "subclass": 4, "although": 4, "recip": 4, "one": 4, "instanc": 4, "afterward": 4, "instead": 4, "sinc": 4, "former": 4, "care": 4, "regist": 4, "hook": 4, "while": 4, "latter": 4, "silent": 4, "ignor": 4, "them": 4, "n_gene": 4, "gene_dim": 4, "n_celltyp": 4, "architectur": 4, "pleas": 4, "refer": 4, "our": 4, "paper": 4, "nois": 4, "knowledg": 4, "probabilist": 4, "neural": 4, "number": 4, "dimens": 4, "embed": 4, "would": 4, "celltyp": 4, "integ": 4, "hidden": 4, "layer": 4, "percentag": 4, "drop": 4, "dure": 4, "coeffici": 4, "multipli": 4, "regul": 4, "norm": 4, "tau": 4, "dim": 4, "theta": 4, "10000": 4}, "objects": {"": [[2, 0, 0, "-", "regdiffusion"]], "regdiffusion": [[3, 0, 0, "-", "data"], [2, 0, 0, "-", "evaluator"], [2, 0, 0, "-", "grn"], [2, 0, 0, "-", "logger"], [4, 0, 0, "-", "models"], [2, 0, 0, "-", "trainer"]], "regdiffusion.data": [[3, 0, 0, "-", "beeline"], [3, 0, 0, "-", "microglia"], [3, 0, 0, "-", "utils"]], "regdiffusion.data.beeline": [[3, 1, 1, "", "cell_type_separator"], [3, 1, 1, "", "download_beeline"], [3, 1, 1, "", "load_beeline"], [3, 1, 1, "", "load_beeline_ground_truth"]], "regdiffusion.data.microglia": [[3, 1, 1, "", "download_regdiffusion_data"], [3, 1, 1, "", "load_atlas_microglia"], [3, 1, 1, "", "load_hammond_microglia"]], "regdiffusion.data.utils": [[3, 1, 1, "", "download_file"]], "regdiffusion.evaluator": [[2, 2, 1, "", "GRNEvaluator"]], "regdiffusion.evaluator.GRNEvaluator": [[2, 3, 1, "", "evaluate"]], "regdiffusion.grn": [[2, 2, 1, "", "GRN"], [2, 1, 1, "", "read_hdf5"]], "regdiffusion.grn.GRN": [[2, 3, 1, "", "extract_node_2hop_neighborhood"], [2, 3, 1, "", "extract_node_neighbors"], [2, 3, 1, "", "extract_node_neighbors_as_indices"], [2, 3, 1, "", "extract_node_sources"], [2, 3, 1, "", "extract_node_sources_as_indices"], [2, 3, 1, "", "extract_node_targets"], [2, 3, 1, "", "extract_node_targets_as_indices"], [2, 3, 1, "", "generate_adj_list"], [2, 3, 1, "", "to_hdf5"], [2, 3, 1, "", "visualize_local_neighborhood"]], "regdiffusion.logger": [[2, 2, 1, "", "LightLogger"], [2, 1, 1, "", "load_logger"]], "regdiffusion.logger.LightLogger": [[2, 3, 1, "", "check_early_stopping"], [2, 3, 1, "id0", "finish"], [2, 3, 1, "id1", "log"], [2, 3, 1, "id2", "save"], [2, 3, 1, "id3", "set_configs"], [2, 3, 1, "id4", "start"], [2, 3, 1, "id5", "to_df"]], "regdiffusion.models": [[4, 0, 0, "-", "regdiffusion"]], "regdiffusion.models.regdiffusion": [[4, 2, 1, "", "Block"], [4, 2, 1, "", "GeneEmbeddings"], [4, 2, 1, "", "RegDiffusion"], [4, 2, 1, "", "SinusoidalPositionEmbeddings"]], "regdiffusion.models.regdiffusion.Block": [[4, 3, 1, "", "forward"]], "regdiffusion.models.regdiffusion.GeneEmbeddings": [[4, 3, 1, "", "forward"]], "regdiffusion.models.regdiffusion.RegDiffusion": [[4, 3, 1, "", "I_minus_A"], [4, 3, 1, "", "forward"], [4, 3, 1, "", "get_adj"], [4, 3, 1, "", "get_adj_"], [4, 3, 1, "", "get_gene_emb"], [4, 3, 1, "", "get_sampled_adj_"], [4, 3, 1, "", "soft_thresholding"]], "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings": [[4, 3, 1, "", "forward"]], "regdiffusion.trainer": [[2, 2, 1, "", "RegDiffusionTrainer"], [2, 1, 1, "", "linear_beta_schedule"], [2, 1, 1, "", "power_beta_schedule"]], "regdiffusion.trainer.RegDiffusionTrainer": [[2, 3, 1, "", "forward_pass"], [2, 3, 1, "", "get_adj"], [2, 3, 1, "", "get_grn"], [2, 3, 1, "", "train"], [2, 3, 1, "", "training_curves"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"welcom": 0, "regdiffus": [0, 1, 2, 3, 4], "": 0, "document": 0, "indic": 0, "tabl": 0, "packag": [2, 3, 4], "subpackag": 2, "submodul": [2, 3, 4], "evalu": 2, "modul": [2, 3, 4], "grn": 2, "logger": 2, "trainer": 2, "content": [2, 3, 4], "data": 3, "beelin": 3, "microglia": 3, "util": 3, "model": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Welcome to regdiffusion\u2019s documentation!": [[0, "welcome-to-regdiffusion-s-documentation"]], "Indices and tables": [[0, "indices-and-tables"]], "regdiffusion": [[1, "regdiffusion"]], "regdiffusion package": [[2, "regdiffusion-package"]], "Subpackages": [[2, "subpackages"]], "Submodules": [[2, "submodules"], [3, "submodules"], [4, "submodules"]], "regdiffusion.evaluator module": [[2, "module-regdiffusion.evaluator"]], "regdiffusion.grn module": [[2, "module-regdiffusion.grn"]], "regdiffusion.logger module": [[2, "module-regdiffusion.logger"]], "regdiffusion.trainer module": [[2, "module-regdiffusion.trainer"]], "Module contents": [[2, "module-regdiffusion"], [3, "module-regdiffusion.data"], [4, "module-regdiffusion.models"]], "regdiffusion.data package": [[3, "regdiffusion-data-package"]], "regdiffusion.data.beeline module": [[3, "module-regdiffusion.data.beeline"]], "regdiffusion.data.microglia module": [[3, "module-regdiffusion.data.microglia"]], "regdiffusion.data.utils module": [[3, "module-regdiffusion.data.utils"]], "regdiffusion.models package": [[4, "regdiffusion-models-package"]], "regdiffusion.models.regdiffusion module": [[4, "module-regdiffusion.models.regdiffusion"]]}, "indexentries": {"grn (class in regdiffusion.grn)": [[2, "regdiffusion.grn.GRN"]], "grnevaluator (class in regdiffusion.evaluator)": [[2, "regdiffusion.evaluator.GRNEvaluator"]], "lightlogger (class in regdiffusion.logger)": [[2, "regdiffusion.logger.LightLogger"]], "regdiffusiontrainer (class in regdiffusion.trainer)": [[2, "regdiffusion.trainer.RegDiffusionTrainer"]], "check_early_stopping() (regdiffusion.logger.lightlogger method)": [[2, "regdiffusion.logger.LightLogger.check_early_stopping"]], "evaluate() (regdiffusion.evaluator.grnevaluator method)": [[2, "regdiffusion.evaluator.GRNEvaluator.evaluate"]], "extract_node_2hop_neighborhood() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_2hop_neighborhood"]], "extract_node_neighbors() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_neighbors"]], "extract_node_neighbors_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_neighbors_as_indices"]], "extract_node_sources() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_sources"]], "extract_node_sources_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_sources_as_indices"]], "extract_node_targets() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_targets"]], "extract_node_targets_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_targets_as_indices"]], "finish() (regdiffusion.logger.lightlogger method)": [[2, "id0"], [2, "regdiffusion.logger.LightLogger.finish"]], "forward_pass() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.forward_pass"]], "generate_adj_list() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.generate_adj_list"]], "get_adj() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.get_adj"]], "get_grn() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.get_grn"]], "linear_beta_schedule() (in module regdiffusion.trainer)": [[2, "regdiffusion.trainer.linear_beta_schedule"]], "load_logger() (in module regdiffusion.logger)": [[2, "regdiffusion.logger.load_logger"]], "log() (regdiffusion.logger.lightlogger method)": [[2, "id1"], [2, "regdiffusion.logger.LightLogger.log"]], "module": [[2, "module-regdiffusion"], [2, "module-regdiffusion.evaluator"], [2, "module-regdiffusion.grn"], [2, "module-regdiffusion.logger"], [2, "module-regdiffusion.trainer"], [3, "module-regdiffusion.data"], [3, "module-regdiffusion.data.beeline"], [3, "module-regdiffusion.data.microglia"], [3, "module-regdiffusion.data.utils"], [4, "module-regdiffusion.models"], [4, "module-regdiffusion.models.regdiffusion"]], "power_beta_schedule() (in module regdiffusion.trainer)": [[2, "regdiffusion.trainer.power_beta_schedule"]], "read_hdf5() (in module regdiffusion.grn)": [[2, "regdiffusion.grn.read_hdf5"]], "regdiffusion": [[2, "module-regdiffusion"]], "regdiffusion.evaluator": [[2, "module-regdiffusion.evaluator"]], "regdiffusion.grn": [[2, "module-regdiffusion.grn"]], "regdiffusion.logger": [[2, "module-regdiffusion.logger"]], "regdiffusion.trainer": [[2, "module-regdiffusion.trainer"]], "save() (regdiffusion.logger.lightlogger method)": [[2, "id2"], [2, "regdiffusion.logger.LightLogger.save"]], "set_configs() (regdiffusion.logger.lightlogger method)": [[2, "id3"], [2, "regdiffusion.logger.LightLogger.set_configs"]], "start() (regdiffusion.logger.lightlogger method)": [[2, "id4"], [2, "regdiffusion.logger.LightLogger.start"]], "to_df() (regdiffusion.logger.lightlogger method)": [[2, "id5"], [2, "regdiffusion.logger.LightLogger.to_df"]], "to_hdf5() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.to_hdf5"]], "train() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.train"]], "training_curves() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.training_curves"]], "visualize_local_neighborhood() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.visualize_local_neighborhood"]], "cell_type_separator() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.cell_type_separator"]], "download_beeline() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.download_beeline"]], "download_file() (in module regdiffusion.data.utils)": [[3, "regdiffusion.data.utils.download_file"]], "download_regdiffusion_data() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.download_regdiffusion_data"]], "load_atlas_microglia() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.load_atlas_microglia"]], "load_beeline() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.load_beeline"]], "load_beeline_ground_truth() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.load_beeline_ground_truth"]], "load_hammond_microglia() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.load_hammond_microglia"]], "regdiffusion.data": [[3, "module-regdiffusion.data"]], "regdiffusion.data.beeline": [[3, "module-regdiffusion.data.beeline"]], "regdiffusion.data.microglia": [[3, "module-regdiffusion.data.microglia"]], "regdiffusion.data.utils": [[3, "module-regdiffusion.data.utils"]], "block (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.Block"]], "geneembeddings (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.GeneEmbeddings"]], "i_minus_a() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.I_minus_A"]], "regdiffusion (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion"]], "sinusoidalpositionembeddings (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings"]], "forward() (regdiffusion.models.regdiffusion.block method)": [[4, "regdiffusion.models.regdiffusion.Block.forward"]], "forward() (regdiffusion.models.regdiffusion.geneembeddings method)": [[4, "regdiffusion.models.regdiffusion.GeneEmbeddings.forward"]], "forward() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.forward"]], "forward() (regdiffusion.models.regdiffusion.sinusoidalpositionembeddings method)": [[4, "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings.forward"]], "get_adj() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_adj"]], "get_adj_() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_adj_"]], "get_gene_emb() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_gene_emb"]], "get_sampled_adj_() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_sampled_adj_"]], "regdiffusion.models": [[4, "module-regdiffusion.models"]], "regdiffusion.models.regdiffusion": [[4, "module-regdiffusion.models.regdiffusion"]], "soft_thresholding() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.soft_thresholding"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "modules", "regdiffusion", "regdiffusion.data", "regdiffusion.models"], "filenames": ["index.rst", "modules.rst", "regdiffusion.rst", "regdiffusion.data.rst", "regdiffusion.models.rst"], "titles": ["Welcome to regdiffusion\u2019s documentation!", "regdiffusion", "regdiffusion package", "regdiffusion.data package", "regdiffusion.models package"], "terms": {"index": 0, "modul": [0, 1], "search": 0, "page": 0, "packag": 1, "subpackag": 1, "data": [1, 2], "submodul": 1, "beelin": [1, 2], "microglia": [1, 2], "util": [1, 2], "content": 1, "model": [1, 2], "evalu": 1, "grnevalu": [1, 2], "grn": 1, "extract_node_2hop_neighborhood": [1, 2], "extract_node_neighbor": [1, 2], "extract_node_neighbors_as_indic": [1, 2], "extract_node_sourc": [1, 2], "extract_node_sources_as_indic": [1, 2], "extract_node_target": [1, 2], "extract_node_targets_as_indic": [1, 2], "generate_adj_list": [1, 2], "to_hdf5": [1, 2], "visualize_local_neighborhood": [1, 2], "read_hdf5": [1, 2], "logger": 1, "lightlogg": [1, 2], "set_config": [1, 2], "start": [1, 2], "log": [1, 2, 3], "finish": [1, 2], "to_df": [1, 2], "save": [1, 2], "check_early_stop": [1, 2], "load_logg": [1, 2], "trainer": 1, "regdiffusiontrain": [1, 2], "forward_pass": [1, 2], "get_adj": [1, 2, 4], "get_grn": [1, 2], "train": [1, 2, 4], "training_curv": [1, 2], "linear_beta_schedul": [1, 2], "power_beta_schedul": [1, 2], "cell_type_separ": [2, 3], "download_beelin": [2, 3], "load_beelin": [2, 3], "load_beeline_ground_truth": [2, 3], "download_regdiffusion_data": [2, 3], "load_atlas_microglia": [2, 3], "load_hammond_microglia": [2, 3], "download_fil": [2, 3], "block": [2, 4], "forward": [2, 4], "geneembed": [2, 4], "i_minus_a": [2, 4], "get_adj_": [2, 4], "get_gene_emb": [2, 4], "get_sampled_adj_": [2, 4], "soft_threshold": [2, 4], "sinusoidalpositionembed": [2, 4], "class": [2, 4], "ground_truth": 2, "gene_nam": 2, "metric": 2, "auroc": 2, "aupr": 2, "auprr": 2, "ep": 2, "epr": 2, "sourc": [2, 3, 4], "base": [2, 4], "object": 2, "A": [2, 4], "gener": 2, "infer": [2, 4], "paramet": [2, 3, 4], "np": 2, "ndarrai": 2, "list": [2, 4], "either": [2, 3], "2d": 2, "numpi": 2, "arrai": 2, "hold": 2, "ground": [2, 3], "truth": [2, 3], "each": 2, "row": [2, 3], "i": [2, 3, 4], "an": 2, "edg": 2, "includ": 2, "name": 2, "target": 2, "node": 2, "For": [2, 4], "exampl": 2, "b": 2, "c": 2, "1d": 2, "gene": [2, 3, 4], "make": 2, "sure": 2, "order": 2, "same": 2, "adjac": [2, 4], "matrix": [2, 4], "support": 2, "current": 2, "adj_matrix": 2, "tf_name": 2, "none": [2, 4], "top_gene_percentil": 2, "int": [2, 4], "analyz": 2, "regulatori": 2, "network": 2, "between": [2, 4], "transcript": 2, "factor": 2, "The": [2, 4], "expect": [2, 4], "shape": 2, "In": 2, "mani": 2, "case": 2, "when": 2, "tf": 2, "ar": [2, 4], "specifi": [2, 4], "we": [2, 3], "have": 2, "squar": 2, "predict": 2, "weight": 2, "probabl": 2, "float": [2, 4], "To": 2, "creat": 2, "you": 2, "need": [2, 4], "least": 2, "two": 2, "thing": 2, "correspond": [2, 3], "can": 2, "further": 2, "your": 2, "hdf5": 2, "format": 2, "us": [2, 4], "method": 2, "load": [2, 3], "function": [2, 4], "thi": [2, 4], "If": [2, 3, 4], "veri": 2, "larg": 2, "space": 2, "concern": 2, "mai": 2, "consid": 2, "provid": [2, 4], "valu": [2, 4], "calcul": 2, "cutoff": 2, "point": 2, "everi": [2, 4], "whose": 2, "absolut": 2, "below": 2, "set": [2, 3], "zero": 2, "later": 2, "spars": 2, "reduc": 2, "requir": 2, "come": 2, "visual": 2, "top": 2, "level": 2, "interfac": 2, "all": [2, 4], "option": 2, "onli": [2, 3], "k": 2, "kept": 2, "other": 2, "str": [2, 3], "20": 2, "datafram": 2, "panda": 2, "local": 2, "neighborhood": 2, "2": 2, "hop": 2, "around": 2, "select": [2, 3], "": 2, "singl": [2, 3, 4], "inspect": 2, "node_s": 2, "size": [2, 4], "direct": 2, "neighbor": 2, "sort": 2, "3": [2, 4], "column": [2, 3], "dict": 2, "dictionari": 2, "It": 2, "slightli": 2, "faster": 2, "than": 2, "version": 2, "from": [2, 3, 4], "simpli": 2, "file_path": [2, 3], "as_spars": 2, "bool": 2, "fals": 2, "file": 2, "prefer": 2, "most": 2, "path": 2, "whether": 2, "8": 2, "edge_width": 2, "1": [2, 4], "0": [2, 3, 4], "5": [2, 4], "font_siz": 2, "30": 2, "node_group_dict": 2, "cdn_resourc": 2, "remot": 2, "notebook": 2, "true": [2, 3], "vi": 2, "j": 2, "width": 2, "1st": 2, "2nd": 2, "font": 2, "label": 2, "kei": 2, "being": 2, "group": 2, "color": 2, "where": [2, 3], "resourc": 2, "default": [2, 4], "boolean": 2, "indic": 2, "happen": 2, "jupyt": 2, "read": 2, "see": 2, "document": 2, "detail": [2, 4], "result_dir": 2, "result_log": 2, "log_dat": 2, "lightweight": 2, "run": [2, 4], "complet": 2, "take": [2, 4], "inspir": 2, "w": 2, "environ": 2, "also": 2, "multipl": 2, "separ": 2, "experi": 2, "dir": 2, "within": [2, 4], "date": 2, "subdirectori": 2, "variabl": 2, "wai": 2, "custom": 2, "config": 2, "configur": 2, "python": 2, "memori": [2, 3], "futur": 2, "export": 2, "note": 2, "new": 2, "log_dict": 2, "step": [2, 3, 4], "contain": 2, "perform": [2, 4], "save_now": 2, "end": [2, 3], "tidi": 2, "convert": 2, "item": 2, "10": 2, "json": 2, "exp_arrai": 2, "cell_typ": 2, "devic": 2, "cuda": 2, "t": [2, 4], "5000": 2, "start_nois": 2, "0001": 2, "end_nois": 2, "02": 2, "lr_nn": 2, "001": 2, "lr_adj": 2, "weight_decay_nn": 2, "weight_decay_adj": 2, "01": 2, "sparse_loss_coef": 2, "25": 2, "adj_dropout": [2, 4], "batch_siz": 2, "128": 2, "n_step": 2, "1000": 2, "train_split": 2, "train_split_se": 2, "123": 2, "eval_on_n_step": 2, "100": 2, "time_dim": [2, 4], "64": 2, "celltype_dim": [2, 4], "4": [2, 3, 4], "hidden_dim": [2, 4], "16": [2, 4], "init_coef": [2, 4], "compil": 2, "initi": [2, 4], "x_0": 2, "diffus": [2, 4], "pass": [2, 4], "torch": 2, "floattensor": 2, "tensor": 2, "express": 2, "cell": [2, 3, 4], "longtensor": 2, "time": [2, 4], "mean_schedul": 2, "mean": 2, "schedul": 2, "std_schedul": 2, "std": 2, "timestep": 2, "power": 2, "analyt": 2, "sc_data": 3, "cell_type_element_indic": 3, "sep": 3, "_": 3, "save_dir": 3, "remove_zip": 3, "data_dir": 3, "benchmark_data": 3, "hesc": 3, "benchmark_set": 3, "500_string": 3, "download": 3, "necessari": 3, "root": 3, "folder": 3, "locat": 3, "benchmark": 3, "dataset": 3, "choos": 3, "among": 3, "hhep": 3, "mdc": 3, "mesc": 3, "mhsc": 3, "gm": 3, "l": 3, "1000_string": 3, "500_non": 3, "chip": 3, "1000_non": 3, "500_chip": 3, "seq": 3, "1000_chip": 3, "500_lofgof": 3, "1000_lofgof": 3, "lofgof": 3, "avail": 3, "return": 3, "first": [3, 4], "element": 3, "scanpi": 3, "second": 3, "type": [3, 4], "tupl": 3, "file_nam": 3, "scp795": 3, "http": 3, "singlecel": 3, "broadinstitut": 3, "org": 3, "single_cel": 3, "studi": 3, "transcriptom": 3, "atla": 3, "mous": 3, "cerebellum": 3, "summari": 3, "just": 3, "count": 3, "ha": 3, "been": 3, "transform": 3, "hammond": 3, "p100": 3, "male": 3, "mice": 3, "url": 3, "chunk_siz": 3, "1024": 3, "in_dim": 4, "out_dim": 4, "x": 4, "ct": 4, "defin": 4, "comput": 4, "call": 4, "should": 4, "overridden": 4, "subclass": 4, "although": 4, "recip": 4, "one": 4, "instanc": 4, "afterward": 4, "instead": 4, "sinc": 4, "former": 4, "care": 4, "regist": 4, "hook": 4, "while": 4, "latter": 4, "silent": 4, "ignor": 4, "them": 4, "n_gene": 4, "gene_dim": 4, "n_celltyp": 4, "architectur": 4, "pleas": 4, "refer": 4, "our": 4, "paper": 4, "nois": 4, "knowledg": 4, "probabilist": 4, "neural": 4, "number": 4, "dimens": 4, "embed": 4, "would": 4, "celltyp": 4, "integ": 4, "hidden": 4, "layer": 4, "percentag": 4, "drop": 4, "dure": 4, "coeffici": 4, "multipli": 4, "regul": 4, "norm": 4, "tau": 4, "dim": 4, "theta": 4, "10000": 4}, "objects": {"": [[2, 0, 0, "-", "regdiffusion"]], "regdiffusion": [[2, 1, 1, "", "GRN"], [2, 1, 1, "", "GRNEvaluator"], [2, 1, 1, "", "LightLogger"], [2, 1, 1, "", "RegDiffusionTrainer"], [3, 0, 0, "-", "data"], [2, 0, 0, "-", "evaluator"], [2, 0, 0, "-", "grn"], [2, 3, 1, "", "load_logger"], [2, 0, 0, "-", "logger"], [4, 0, 0, "-", "models"], [2, 3, 1, "", "read_hdf5"], [2, 0, 0, "-", "trainer"]], "regdiffusion.GRN": [[2, 2, 1, "", "extract_node_2hop_neighborhood"], [2, 2, 1, "", "extract_node_neighbors"], [2, 2, 1, "", "extract_node_neighbors_as_indices"], [2, 2, 1, "", "extract_node_sources"], [2, 2, 1, "", "extract_node_sources_as_indices"], [2, 2, 1, "", "extract_node_targets"], [2, 2, 1, "", "extract_node_targets_as_indices"], [2, 2, 1, "", "generate_adj_list"], [2, 2, 1, "", "to_hdf5"], [2, 2, 1, "", "visualize_local_neighborhood"]], "regdiffusion.GRNEvaluator": [[2, 2, 1, "", "evaluate"]], "regdiffusion.LightLogger": [[2, 2, 1, "", "check_early_stopping"], [2, 2, 1, "id6", "finish"], [2, 2, 1, "id7", "log"], [2, 2, 1, "id8", "save"], [2, 2, 1, "id9", "set_configs"], [2, 2, 1, "id10", "start"], [2, 2, 1, "id11", "to_df"]], "regdiffusion.RegDiffusionTrainer": [[2, 2, 1, "", "forward_pass"], [2, 2, 1, "", "get_adj"], [2, 2, 1, "", "get_grn"], [2, 2, 1, "", "train"], [2, 2, 1, "", "training_curves"]], "regdiffusion.data": [[3, 0, 0, "-", "beeline"], [3, 0, 0, "-", "microglia"], [3, 0, 0, "-", "utils"]], "regdiffusion.data.beeline": [[3, 3, 1, "", "cell_type_separator"], [3, 3, 1, "", "download_beeline"], [3, 3, 1, "", "load_beeline"], [3, 3, 1, "", "load_beeline_ground_truth"]], "regdiffusion.data.microglia": [[3, 3, 1, "", "download_regdiffusion_data"], [3, 3, 1, "", "load_atlas_microglia"], [3, 3, 1, "", "load_hammond_microglia"]], "regdiffusion.data.utils": [[3, 3, 1, "", "download_file"]], "regdiffusion.evaluator": [[2, 1, 1, "", "GRNEvaluator"]], "regdiffusion.evaluator.GRNEvaluator": [[2, 2, 1, "", "evaluate"]], "regdiffusion.grn": [[2, 1, 1, "", "GRN"], [2, 3, 1, "", "read_hdf5"]], "regdiffusion.grn.GRN": [[2, 2, 1, "", "extract_node_2hop_neighborhood"], [2, 2, 1, "", "extract_node_neighbors"], [2, 2, 1, "", "extract_node_neighbors_as_indices"], [2, 2, 1, "", "extract_node_sources"], [2, 2, 1, "", "extract_node_sources_as_indices"], [2, 2, 1, "", "extract_node_targets"], [2, 2, 1, "", "extract_node_targets_as_indices"], [2, 2, 1, "", "generate_adj_list"], [2, 2, 1, "", "to_hdf5"], [2, 2, 1, "", "visualize_local_neighborhood"]], "regdiffusion.logger": [[2, 1, 1, "", "LightLogger"], [2, 3, 1, "", "load_logger"]], "regdiffusion.logger.LightLogger": [[2, 2, 1, "", "check_early_stopping"], [2, 2, 1, "id0", "finish"], [2, 2, 1, "id1", "log"], [2, 2, 1, "id2", "save"], [2, 2, 1, "id3", "set_configs"], [2, 2, 1, "id4", "start"], [2, 2, 1, "id5", "to_df"]], "regdiffusion.models": [[4, 0, 0, "-", "regdiffusion"]], "regdiffusion.models.regdiffusion": [[4, 1, 1, "", "Block"], [4, 1, 1, "", "GeneEmbeddings"], [4, 1, 1, "", "RegDiffusion"], [4, 1, 1, "", "SinusoidalPositionEmbeddings"]], "regdiffusion.models.regdiffusion.Block": [[4, 2, 1, "", "forward"]], "regdiffusion.models.regdiffusion.GeneEmbeddings": [[4, 2, 1, "", "forward"]], "regdiffusion.models.regdiffusion.RegDiffusion": [[4, 2, 1, "", "I_minus_A"], [4, 2, 1, "", "forward"], [4, 2, 1, "", "get_adj"], [4, 2, 1, "", "get_adj_"], [4, 2, 1, "", "get_gene_emb"], [4, 2, 1, "", "get_sampled_adj_"], [4, 2, 1, "", "soft_thresholding"]], "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings": [[4, 2, 1, "", "forward"]], "regdiffusion.trainer": [[2, 1, 1, "", "RegDiffusionTrainer"], [2, 3, 1, "", "linear_beta_schedule"], [2, 3, 1, "", "power_beta_schedule"]], "regdiffusion.trainer.RegDiffusionTrainer": [[2, 2, 1, "", "forward_pass"], [2, 2, 1, "", "get_adj"], [2, 2, 1, "", "get_grn"], [2, 2, 1, "", "train"], [2, 2, 1, "", "training_curves"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"welcom": 0, "regdiffus": [0, 1, 2, 3, 4], "": 0, "document": 0, "indic": 0, "tabl": 0, "packag": [2, 3, 4], "subpackag": 2, "submodul": [2, 3, 4], "evalu": 2, "modul": [2, 3, 4], "grn": 2, "logger": 2, "trainer": 2, "content": [2, 3, 4], "data": 3, "beelin": 3, "microglia": 3, "util": 3, "model": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Welcome to regdiffusion\u2019s documentation!": [[0, "welcome-to-regdiffusion-s-documentation"]], "Indices and tables": [[0, "indices-and-tables"]], "regdiffusion": [[1, "regdiffusion"]], "regdiffusion package": [[2, "regdiffusion-package"]], "Subpackages": [[2, "subpackages"]], "Submodules": [[2, "submodules"], [3, "submodules"], [4, "submodules"]], "regdiffusion.evaluator module": [[2, "module-regdiffusion.evaluator"]], "regdiffusion.grn module": [[2, "module-regdiffusion.grn"]], "regdiffusion.logger module": [[2, "module-regdiffusion.logger"]], "regdiffusion.trainer module": [[2, "module-regdiffusion.trainer"]], "Module contents": [[2, "module-regdiffusion"], [3, "module-regdiffusion.data"], [4, "module-regdiffusion.models"]], "regdiffusion.data package": [[3, "regdiffusion-data-package"]], "regdiffusion.data.beeline module": [[3, "module-regdiffusion.data.beeline"]], "regdiffusion.data.microglia module": [[3, "module-regdiffusion.data.microglia"]], "regdiffusion.data.utils module": [[3, "module-regdiffusion.data.utils"]], "regdiffusion.models package": [[4, "regdiffusion-models-package"]], "regdiffusion.models.regdiffusion module": [[4, "module-regdiffusion.models.regdiffusion"]]}, "indexentries": {"grn (class in regdiffusion)": [[2, "regdiffusion.GRN"]], "grn (class in regdiffusion.grn)": [[2, "regdiffusion.grn.GRN"]], "grnevaluator (class in regdiffusion)": [[2, "regdiffusion.GRNEvaluator"]], "grnevaluator (class in regdiffusion.evaluator)": [[2, "regdiffusion.evaluator.GRNEvaluator"]], "lightlogger (class in regdiffusion)": [[2, "regdiffusion.LightLogger"]], "lightlogger (class in regdiffusion.logger)": [[2, "regdiffusion.logger.LightLogger"]], "regdiffusiontrainer (class in regdiffusion)": [[2, "regdiffusion.RegDiffusionTrainer"]], "regdiffusiontrainer (class in regdiffusion.trainer)": [[2, "regdiffusion.trainer.RegDiffusionTrainer"]], "check_early_stopping() (regdiffusion.lightlogger method)": [[2, "regdiffusion.LightLogger.check_early_stopping"]], "check_early_stopping() (regdiffusion.logger.lightlogger method)": [[2, "regdiffusion.logger.LightLogger.check_early_stopping"]], "evaluate() (regdiffusion.grnevaluator method)": [[2, "regdiffusion.GRNEvaluator.evaluate"]], "evaluate() (regdiffusion.evaluator.grnevaluator method)": [[2, "regdiffusion.evaluator.GRNEvaluator.evaluate"]], "extract_node_2hop_neighborhood() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_2hop_neighborhood"]], "extract_node_2hop_neighborhood() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_2hop_neighborhood"]], "extract_node_neighbors() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_neighbors"]], "extract_node_neighbors() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_neighbors"]], "extract_node_neighbors_as_indices() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_neighbors_as_indices"]], "extract_node_neighbors_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_neighbors_as_indices"]], "extract_node_sources() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_sources"]], "extract_node_sources() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_sources"]], "extract_node_sources_as_indices() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_sources_as_indices"]], "extract_node_sources_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_sources_as_indices"]], "extract_node_targets() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_targets"]], "extract_node_targets() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_targets"]], "extract_node_targets_as_indices() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.extract_node_targets_as_indices"]], "extract_node_targets_as_indices() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.extract_node_targets_as_indices"]], "finish() (regdiffusion.lightlogger method)": [[2, "id6"], [2, "regdiffusion.LightLogger.finish"]], "finish() (regdiffusion.logger.lightlogger method)": [[2, "id0"], [2, "regdiffusion.logger.LightLogger.finish"]], "forward_pass() (regdiffusion.regdiffusiontrainer method)": [[2, "regdiffusion.RegDiffusionTrainer.forward_pass"]], "forward_pass() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.forward_pass"]], "generate_adj_list() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.generate_adj_list"]], "generate_adj_list() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.generate_adj_list"]], "get_adj() (regdiffusion.regdiffusiontrainer method)": [[2, "regdiffusion.RegDiffusionTrainer.get_adj"]], "get_adj() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.get_adj"]], "get_grn() (regdiffusion.regdiffusiontrainer method)": [[2, "regdiffusion.RegDiffusionTrainer.get_grn"]], "get_grn() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.get_grn"]], "linear_beta_schedule() (in module regdiffusion.trainer)": [[2, "regdiffusion.trainer.linear_beta_schedule"]], "load_logger() (in module regdiffusion)": [[2, "regdiffusion.load_logger"]], "load_logger() (in module regdiffusion.logger)": [[2, "regdiffusion.logger.load_logger"]], "log() (regdiffusion.lightlogger method)": [[2, "id7"], [2, "regdiffusion.LightLogger.log"]], "log() (regdiffusion.logger.lightlogger method)": [[2, "id1"], [2, "regdiffusion.logger.LightLogger.log"]], "module": [[2, "module-regdiffusion"], [2, "module-regdiffusion.evaluator"], [2, "module-regdiffusion.grn"], [2, "module-regdiffusion.logger"], [2, "module-regdiffusion.trainer"], [3, "module-regdiffusion.data"], [3, "module-regdiffusion.data.beeline"], [3, "module-regdiffusion.data.microglia"], [3, "module-regdiffusion.data.utils"], [4, "module-regdiffusion.models"], [4, "module-regdiffusion.models.regdiffusion"]], "power_beta_schedule() (in module regdiffusion.trainer)": [[2, "regdiffusion.trainer.power_beta_schedule"]], "read_hdf5() (in module regdiffusion)": [[2, "regdiffusion.read_hdf5"]], "read_hdf5() (in module regdiffusion.grn)": [[2, "regdiffusion.grn.read_hdf5"]], "regdiffusion": [[2, "module-regdiffusion"]], "regdiffusion.evaluator": [[2, "module-regdiffusion.evaluator"]], "regdiffusion.grn": [[2, "module-regdiffusion.grn"]], "regdiffusion.logger": [[2, "module-regdiffusion.logger"]], "regdiffusion.trainer": [[2, "module-regdiffusion.trainer"]], "save() (regdiffusion.lightlogger method)": [[2, "id8"], [2, "regdiffusion.LightLogger.save"]], "save() (regdiffusion.logger.lightlogger method)": [[2, "id2"], [2, "regdiffusion.logger.LightLogger.save"]], "set_configs() (regdiffusion.lightlogger method)": [[2, "id9"], [2, "regdiffusion.LightLogger.set_configs"]], "set_configs() (regdiffusion.logger.lightlogger method)": [[2, "id3"], [2, "regdiffusion.logger.LightLogger.set_configs"]], "start() (regdiffusion.lightlogger method)": [[2, "id10"], [2, "regdiffusion.LightLogger.start"]], "start() (regdiffusion.logger.lightlogger method)": [[2, "id4"], [2, "regdiffusion.logger.LightLogger.start"]], "to_df() (regdiffusion.lightlogger method)": [[2, "id11"], [2, "regdiffusion.LightLogger.to_df"]], "to_df() (regdiffusion.logger.lightlogger method)": [[2, "id5"], [2, "regdiffusion.logger.LightLogger.to_df"]], "to_hdf5() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.to_hdf5"]], "to_hdf5() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.to_hdf5"]], "train() (regdiffusion.regdiffusiontrainer method)": [[2, "regdiffusion.RegDiffusionTrainer.train"]], "train() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.train"]], "training_curves() (regdiffusion.regdiffusiontrainer method)": [[2, "regdiffusion.RegDiffusionTrainer.training_curves"]], "training_curves() (regdiffusion.trainer.regdiffusiontrainer method)": [[2, "regdiffusion.trainer.RegDiffusionTrainer.training_curves"]], "visualize_local_neighborhood() (regdiffusion.grn method)": [[2, "regdiffusion.GRN.visualize_local_neighborhood"]], "visualize_local_neighborhood() (regdiffusion.grn.grn method)": [[2, "regdiffusion.grn.GRN.visualize_local_neighborhood"]], "cell_type_separator() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.cell_type_separator"]], "download_beeline() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.download_beeline"]], "download_file() (in module regdiffusion.data.utils)": [[3, "regdiffusion.data.utils.download_file"]], "download_regdiffusion_data() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.download_regdiffusion_data"]], "load_atlas_microglia() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.load_atlas_microglia"]], "load_beeline() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.load_beeline"]], "load_beeline_ground_truth() (in module regdiffusion.data.beeline)": [[3, "regdiffusion.data.beeline.load_beeline_ground_truth"]], "load_hammond_microglia() (in module regdiffusion.data.microglia)": [[3, "regdiffusion.data.microglia.load_hammond_microglia"]], "regdiffusion.data": [[3, "module-regdiffusion.data"]], "regdiffusion.data.beeline": [[3, "module-regdiffusion.data.beeline"]], "regdiffusion.data.microglia": [[3, "module-regdiffusion.data.microglia"]], "regdiffusion.data.utils": [[3, "module-regdiffusion.data.utils"]], "block (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.Block"]], "geneembeddings (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.GeneEmbeddings"]], "i_minus_a() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.I_minus_A"]], "regdiffusion (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion"]], "sinusoidalpositionembeddings (class in regdiffusion.models.regdiffusion)": [[4, "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings"]], "forward() (regdiffusion.models.regdiffusion.block method)": [[4, "regdiffusion.models.regdiffusion.Block.forward"]], "forward() (regdiffusion.models.regdiffusion.geneembeddings method)": [[4, "regdiffusion.models.regdiffusion.GeneEmbeddings.forward"]], "forward() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.forward"]], "forward() (regdiffusion.models.regdiffusion.sinusoidalpositionembeddings method)": [[4, "regdiffusion.models.regdiffusion.SinusoidalPositionEmbeddings.forward"]], "get_adj() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_adj"]], "get_adj_() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_adj_"]], "get_gene_emb() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_gene_emb"]], "get_sampled_adj_() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.get_sampled_adj_"]], "regdiffusion.models": [[4, "module-regdiffusion.models"]], "regdiffusion.models.regdiffusion": [[4, "module-regdiffusion.models.regdiffusion"]], "soft_thresholding() (regdiffusion.models.regdiffusion.regdiffusion method)": [[4, "regdiffusion.models.regdiffusion.RegDiffusion.soft_thresholding"]]}}) \ No newline at end of file