-
Notifications
You must be signed in to change notification settings - Fork 2
essHIC.ess
stefanofranzini edited this page Sep 27, 2020
·
1 revision
essHIC.ess(indir,norm,chromo,res,masked=[])The ess class provides methods to compare each couple of HiC maps in the dataset and compute the essential distance matrix.
- indir: string
- path to the directory that contains all experiments.
- norm: string
- normalization of the HiC matrices to compare.
- chromo: integer
- number of the chromosome to compare
- res: string
- resolution of the HiC matrices to compare.
- input_path: string
- path of the directory containing the experiments.
- norm: string
- normalization of the HiC matrices to compare.
- chromo: integer
- chromosome of the HiC matrices to compare.
- res: string
- resolution of the HiC matrices to compare.
- filelist: list of strings
- list of paths of the matrices to compare.
- nmatrix: integer
- number of matrices to compare.
- max_nvec: integer
- number of eigenspaces to compute for each HiC matrix
- eig: dictionary of numpy ndarray
- dictionary of the eigenvalues of each experiment. The keys are the names of the experiments
- eigv: dictionary of numpy ndarray
- dictionary of the eigenvectors of each experiment. The keys are the names of the experiments
- banned: dictionary of numpy ndarray
- dictionary of the indices of the empty columns of each experiment. The keys are the names of the experiments
- significant: dictionary of numpy ndarray
- of the significant eigenspaces for each experiment. The keys are the names of the experiments.
| method | function |
|---|---|
| get_spectra | computes spectra of all experiments. |
| get_pseudo_spectra | computes spectra of all experiments and pseudo-replicate experiments. |
| test_random | tests which eigenvectors are not significant. |
| get_essential_distance | computes the essential distance matrix. |
__init__(indir,norm,chromo,res,masked=[])initialize self.
get_spectra(self,nvec)computes the spectrum of each experiment, up to nvec eigenspaces.
- nvec: integer
- number of eigenvectors and eigenvalues to compute for each experiment.
- none
get_pseudo_spectra(self,nvec,npseudo=-1,from_norm='nrm')computes the spectra of the experiments and of pseudo-replicates obtained from them up to nvec eigenspaces. It also writes a pseudo metadata file.
- nvec: integer
- number of eigenvectors and eigenvalues to compute for each experiment.
- npseudo: integer, default=-1
- number of pseudo-replicates to create. If negative, computes pseudo-replicates until each cell type as the same number of experiments in the dataset.
- from_norm: string, default='nrm'
- normalization from which to sample the pseudo replicates.
- none
test_random(self,pvalue=1)computes which eigenspaces are significant, according to the given p-value.
- pvalue: float, default=1
- p-value below which eigenspaces are significant.
- none
get_essential_distance(self,output,nvec=-1,spectrum='flat')computes and writes a essential distance matrix which contains the distances between all couples of HiC maps in the dataset.
- output: string
- path of the output file where the essential distance matrix is written.
- nvec: {'test',integer}, default=-1
- number of eigenspaces to use to compute the essential distance matrix. If negative, it uses all eigenspaces computed. if test, only uses significant eigenspaces.
- spectrum: {'flat','norm','none',float}, default=1.:
- normalization of the eigenvalue. See the hic class for more information about the normalizations.
- none