grnet.gene_selection package

Module contents

grnet.gene_selection.go_intersection(markers: List[str], species: str = 'human', unique: bool = False) ndarray

function to return GO terms in the set-theoretical intersection

Parameters

markers: List[str]

list of marker gene symbols

species: str = “human”

the name of the species (supported in mygene.MyGeneInfo)

unique: bool = False

pass True to deal GO terms of the identical GOIDs but in different domains (e.g., “BP”, “CC”, “MF”) as the same terms

Returns

intersec_goterms: numpy.ndarray

GO terms in the set-theoretical intersection

grnet.gene_selection.go_jaccard_matrix(markers: List[str], species: str = 'human', unique: bool = False) ndarray

function to calculate jaccard index matrix (JIM) based on GO terms of the given gene symbols Jaccard Index \(J(A,B)\) of two sets \(A,B\) and the element in the \(i\)-th row and \(j\)-th column of the JIM is defined as follows:

\[ \begin{align}\begin{aligned}J(A, B) := \frac{A\cap B}{A \cup B}\\JIM_{i,j} := J(G_i, G_j)\end{aligned}\end{align} \]

where \(G_i, G_j\) are the sets of GO terms for the \(i\)-th and \(j\)-th marker genes.

Parameters

markers: List[str]

list of marker gene symbols

species: str = “human”

the name of the species (supported in mygene.MyGeneInfo)

unique: bool = False

pass True to deal GO terms of the identical GOIDs but in different domains (e.g., “BP”, “CC”, “MF”) as the same terms

Returns

jim: numpy.ndarray

\(n\times n\) JIM where \(n\) is the number of gene symbols

grnet.gene_selection.go_union(markers: List[str], species: str = 'human', unique: bool = False) ndarray

function to return GO terms in the set-theoretical union

Parameters

markers: List[str]

list of marker gene symbols

species: str = “human”

the name of the species (supported in mygene.MyGeneInfo)

unique: bool = False

pass True to deal GO terms of the identical GOIDs but in different domains (e.g., “BP”, “CC”, “MF”) as the same terms

Returns

union_goterms: numpy.ndarray

GO terms in the set-theoretical union

grnet.gene_selection.similar_sym(markers: List[str], species: str = 'human', unique: bool = False, method: str = 'jaccard') ndarray

wrapper function to suggest similar genes based on the designated method

Parameters

markers: List[str]

list of marker gene symbols

species: str = “human”

the name of the species (supported in mygene.MyGeneInfo)

unique: bool = False

pass True to deal GO terms of the identical GOIDs but in different domains (e.g., “BP”, “CC”, “MF”) as the same terms

method: str = “jaccard”

choose from “intersection”, “jaccard”, or “union”

Returns

new_gene_list: numpy.ndarray

given marker genes + suggested gene symbols