module trim_merge_marker

Global Variables

  • TYPE_CHECKING
  • get_mean_var_major_kernel
  • get_mean_var_minor_kernel
  • find_indices_kernel

function timer

timer(func)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function wrapper

wrapper(*args, **kwargs)

function X_to_GPU

X_to_GPU(X)

Transfers matrices and arrays to the GPU.

Args:

  • X: Matrix or array to transfer to the GPU.

function marker_filter_sort

marker_filter_sort(markers, cluster, df_sp, df_frac)

function find_markers

find_markers(adata, subctype_col)

function stds

stds(x, axis=None)

Variance of sparse matrix a var = mean(a2) - mean(a)2

Standard deviation of sparse matrix a std = sqrt(var(a))


function find_cluster_pairs_to_merge

find_cluster_pairs_to_merge(adata, x, colname, cluster, markers)

function adata_cluster_merge

adata_cluster_merge(adata, subctype_col)

Need a description.


function specificity_score

specificity_score(adata=None, ctype_col: str = None, glist: list = None)

function fraction_cells

fraction_cells(adata=None, ctype_col: str = None, glist: list = None)

Given adata.X (n cells * m genes), ctype_col (a column name in adata.obs that stores the cell type annotation), and a glist (for example, [gene1, gene2, ..., genek]) The definiation of Fraction of expression := # cells>0 / # total cells. Assume in total c different cell types for each cell type, subset the adata, and then calculate the fraction of expression of each gene return the fraction dataframe, k rows, c columns.


function myNSForest

myNSForest(
    adata,
    cluster_header,
    cluster_list=None,
    medians_header=None,
    n_trees=100,
    n_jobs=-1,
    beta=0.5,
    n_top_genes=15,
    n_binary_genes=10,
    n_genes_eval=6,
    output_folder='.',
    save_results=False
)

class UF

method __init__

__init__(n)

method current_kids_dict

current_kids_dict()

method final

final()

method find

find(x)

method union

union(x, y)

class data2UF

method __init__

__init__(celltypes: list, merge_pairs: list[tuple])

method union_pairs

union_pairs() → int

This file was automatically generated via lazydocs.