ALLCools.clustering.mcad
Contents
ALLCools.clustering.mcad
¶
Module Contents¶
- remove_black_list_region(adata, black_list_path, f=0.2)[source]¶
Remove regions overlap (bedtools intersect -f {f}) with regions in the black_list_path
- Parameters
adata –
black_list_path – Path to the black list bed file
f – Fraction of overlap when calling bedtools intersect
- Returns
- Return type
- binarize_matrix(adata, cutoff=0.95)[source]¶
Binarize adata.X with adata.X > cutoff
- Parameters
adata – AnnData object whose X is survival function matrix
cutoff – Cutoff to binarize the survival function
- Returns
- Return type
- filter_regions(adata, hypo_percent=0.5)[source]¶
Filter regions based on % of cells having non-zero scores.
- Parameters
adata –
hypo_percent – min % of cells that are non-zero in this region.
- lsi(adata, scale_factor=100000, n_components=100, algorithm='arpack', obsm='X_pca', random_state=0, fit_size=None)[source]¶
Run TF-IDF on the binarized adata.X, followed by TruncatedSVD and then scale the components by svd.singular_values_
- Parameters
adata –
scale_factor –
n_components –
algorithm –
obsm –
random_state –
fit_size – Ratio or absolute int value, use to downsample when fitting the SVD to speed up run time.