metaloci package
Subpackages
Submodules
metaloci.mlo module
Class for the METALoci object
- class metaloci.mlo.MetalociObject(region: str, resolution: int, save_path: str, chrom: str = None, start: int = None, end: int = None, poi: int = None)
Bases:
objectThis object is base class of METALoci. It contains all the information for a given region.
- Parameters:
region (str) – Region of interest
resolution (int) – Resolution of the HiC experiment
persistence_length (float) – Persistence length (parameter needed for the Kamada-Kawai algorithm)
save_path (str) – Path where to save the mlo
chrom (str, optional) – Chromosome of the region
start (int, optional) – Start of the region
end (int, optional) – End of the region
poi (int, optional) – Bin position of the point of interest (usually the TSS of the gene)
resolution – Resolution of the Hi-C to use.
persistence_length – Persistence length to use.
save_path – Path to save the object.
chrom – Chromosome of the region.
start – Start of the region.
end – End of the region.
poi – Point of interest of the region.
matrix (numpy.ndarray, optional) – Hi-C matrix for the region.
subset_matrix (numpy.ndarray, optional) – Subset of the matrix.
bad_region (bool, optional) – Bool to indicate if the region does not meet quelity criteria to be considered significant.
mixed_matrices (dict, optional) – Dictionary with the mixed matrices (top half if the full matrix, bottom part is the subset matrix).
signals_dict (dict, optional) – Dictionary with the signals for the region.
flat_matrix (numpy.ndarray, optional) – Flattened matrix.
kk_cutoff (dict, optional) – Dictionary with the cutoffs for the Kamada-Kawai algorithm.
kk_restraints_matrix (numpy.ndarray, optional) – Matrix with the restraints to be used by the Kamada-Kawai algorithm.
kk_top_indexes (numpy.ndarray, optional) – Top indexes of the Kamada-Kawai algorithm, used to build the subset matrix.
kk_graph (networkx.Graph, optional) – Graph of the Kamada-Kawai algorithm.
kk_nodes (numpy.ndarray, optional) – Nodes of the Kamada-Kawai algorithm.
kk_coords (numpy.ndarray, optional) – Coordinates of the Kamada-Kawai algorithm.
kk_distances (numpy.ndarray, optional) – Distances of the Kamada-Kawai algorithm.
agg (numpy.ndarray, optional) – Aggregated signals.
lmi_geometry (numpy.ndarray, optional) – Geometry of the Gaudí plot.
lmi_info (dict, optional) – Information of the the Local Moran’s I output for this region.
- save(file_handler: str)
Function to save the mlobject. :param file_handler: Path to the file name where to save the mlo :type file_handler: str
- metaloci.mlo.reconstruct(state)
Function to reconstruct the object from the state dictionary.