gunz_cm.resolution_enhancements.preprocs package

Submodules

gunz_cm.resolution_enhancements.preprocs.downscaling module

Module.

Examples

gunz_cm.resolution_enhancements.preprocs.downscaling.downscale_counts(counts: ndarray, ds_ratio: int = None, ds_num_counts: int = None, num_counts: int = None, counts_cumsum: ndarray = None, ret_ds_num_counts=False) ndarray[source]

Downscale the counts by either a ratio or a target number of counts.

counts (array_like ):

The counts to be downscaled.

ds_ratio (int, optional):

The ratio to downscale the counts by. Defaults to None.

target_num_counts (int, optional):

The target number of counts to downscale to. Defaults to None.

num_counts (int, optional):

The total number of counts in the input. Defaults to None.

counts_cumsum (np.ndarray, optional):

The cumulative sum of the counts. Defaults to None.

np.ndarray:

The downscaled counts and the target number of counts.

Examples

gunz_cm.resolution_enhancements.preprocs.normalize module

Module.

Examples

gunz_cm.resolution_enhancements.preprocs.normalize.clamp(X, min_val=None, max_val=None)[source]

Function clamp.

Examples

Notes

gunz_cm.resolution_enhancements.preprocs.normalize.min_max_norm(X, min_val=0, max_val=1)[source]

Function min_max_norm.

Examples

Notes

gunz_cm.resolution_enhancements.preprocs.thresholding module

Module.

Examples

gunz_cm.resolution_enhancements.preprocs.thresholding.limit_count(counts: ndarray, min_val: int = None, max_val: int = None) ndarray[source]

Limit the maximum and minimum values of a matrix counts if min_val is not None or/and max_val is not None.

countsnp.ndarray

Input numpy array.

min_valint, optional

Minimum value to limit the array, by default None.

max_valint, optional

Maximum value to limit the array, by default None.

np.ndarray

Output numpy array with limited values.

Examples

Module contents