diff --git a/genindex.html b/genindex.html index b4e3c20..355427b 100644 --- a/genindex.html +++ b/genindex.html @@ -101,8 +101,12 @@
|
power_beta_schedule()
GRN
GRN.extract_node_2hop_neighborhood()
GRN.extract_node_neighbors()
GRN.extract_node_neighbors_as_indices()
GRN.extract_node_sources()
GRN.extract_node_sources_as_indices()
GRN.extract_node_targets()
GRN.extract_node_targets_as_indices()
GRN.generate_adj_list()
GRN.to_hdf5()
GRN.visualize_local_neighborhood()
GRNEvaluator
+LightLogger
+RegDiffusionTrainer
+load_logger()
read_hdf5()
power_beta_schedule()
GRN
GRN.extract_node_2hop_neighborhood()
GRN.extract_node_neighbors()
GRN.extract_node_neighbors_as_indices()
GRN.extract_node_sources()
GRN.extract_node_sources_as_indices()
GRN.extract_node_targets()
GRN.extract_node_targets_as_indices()
GRN.generate_adj_list()
GRN.to_hdf5()
GRN.visualize_local_neighborhood()
GRNEvaluator
+LightLogger
+RegDiffusionTrainer
+load_logger()
read_hdf5()
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 @@
Single-cell Gene Regulatory Networks Inference and Analytics
+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.
+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.
Generate a pandas dataframe for the local neighborhood (2-hop) around +selected gene(s).
+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 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.
+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 a dictionary for the top direct neighbors of selected gene. +It is slightly faster than the dataframe version.
+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 a pandas dataframe for the top direct edge pointing to the +selected gene.
+The dataframe will have 3 columns: source, target, weight.
+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 a dictionary for the top direct edge pointing to the +selected gene. It is slightly faster than the dataframe version.
+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 a pandas dataframe for the top direct edge pointing from the +selected gene.
+The dataframe will have 3 columns: source, target, weight.
+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 a dictionary for the top direct edge pointing from the +selected gene. It is slightly faster than the dataframe version.
+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.
Simply generate a dataframe to hold the adjacency list.
+The dataframe will have 3 columns: source, target, weight.
+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.
+file_path (str) – File path to save.
as_sparse (bool) – Whether to save as sparse matrix
Generate a vis.js network visualization of the local neighborhood +(2-hop) around selected gene(s).
+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.
Bases: object
A generalized evaluator for GRN inference.
+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’.
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.
+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
Save experiment configurations (a python dictionary) to memory for +future exportation
+Start the logging of a new run within an experiment
+Log log_dict (a dictionary containing performance) at each step
+End the logging of a run and save to a local file if save_now is +True
+Convert saved logs to a pandas dataframe
+Save all the logs to path
+Bases: object
Initialize and Train a RegDiffusion model with configs
+Forward diffusion pass
+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
Load a saved log file to a LightLogger object
+path (str) – path to the json file generated by LightLogger.save.
+Read HDF5 file as a GRN object. See the documentation for GRN for details.
+file_path (str) – File path to read.
+