gcell.cell.celltype.Celltype

Contents

gcell.cell.celltype.Celltype#

class gcell.cell.celltype.Celltype(features, num_region_per_sample, celltype, data_dir='../pretrain_human_bingren_shendure_apr2023', interpret_dir='Interpretation', assets_dir='assets/', input=False, jacob=False, embed=False, num_cls=2, s3_file_sys=None)[source]#

Base class for cell type analysis.

This class provides core functionality for analyzing cell type-specific genomic data, including gene expression, motif analysis, and regulatory relationships.

The data-loading logic is now deprecated and only used for the demo data.

For your own analysis, you should use GETHydraCellType.

Parameters:
features ndarray

Array of feature names/identifiers

num_region_per_sample int

Number of regions per sample

celltype str

Name/identifier of the cell type

data_dir default: '../pretrain_human_bingren_shendure_apr2023'

Directory containing data files, by default “../pretrain_human_bingren_shendure_apr2023”

interpret_dir default: 'Interpretation'

Directory for interpretation results, by default “Interpretation”

assets_dir default: 'assets/'

Directory for assets/resources, by default “assets”

input bool (default: False)

Whether to load input data, by default False

jacob bool (default: False)

Whether to load Jacobian data, by default False

embed bool (default: False)

Whether to load embedding data, by default False

num_cls int (default: 2)

Number of classes, by default 2

s3_file_sys default: None

S3 filesystem object for remote storage, by default None

Attributes

gene_by_motif

This method retrieves gene data by motif.

Methods

gene_jacobian_summary(gene[, axis, ...])

Summarizes the Jacobian for a given gene.

get_gene_accessibility(gene_name)

Get the accessibility of a gene.

get_gene_annot(gene_name)

Get the gene annotation of a gene.

get_gene_by_motif([overwrite])

This method retrieves gene data by motif.

get_gene_chromosome(gene_name)

Get the chromosome of a gene.

get_gene_idx(gene_name)

Get the index of a gene in the gene list.

get_gene_jacobian(gene_name[, multiply_input])

Get the jacobian of a gene.

get_gene_jacobian_summary(gene_name[, axis])

Get the jacobian summary of a gene.

get_gene_obs(gene_name)

Get the observed value of a gene.

get_gene_pred(gene_name)

Get the prediction of a gene.

get_gene_strand(gene_name)

Get the strand of a gene.

get_gene_tss(gene_name)

Get the TSS objects of a gene.

get_gene_tss_start(gene_name)

Get the start position of a gene.

get_genes_exp(genes)

Get the expression of a list of genes.

get_highest_exp_genes(genes)

This code takes in a list of genes and returns the gene with the highest expression value.

get_input_data([peak_id, focus, start, end])

Get input data from self.input_all using a slice

get_tf_exp_mean(motif, m)

Calculate the mean expression of transcription factors (TFs) for a given motif and cluster.

get_tf_exp_str(motif, m)

This method generates a formatted string of gene names and their corresponding predicted expression values.

get_tf_pathway(tf[, gp, quantile_cutoff, ...])

This function retrieves the pathway for a given transcription factor (tf) using g:Profiler.

get_tss_idx(gene_name)

Given a gene name, get the TSS index in the peak annotation.

get_tss_jacobian(jacob, tss[, multiply_input])

Get the jacobian of a TSS.

load_gene_annot()

Load gene annotations from feather file.

plot_gene_motifs(gene, motif[, overwrite])

plot_gene_regions(gene[, plotly])

plot_region()

plot_region_plotly(df)

plotly_gene_exp()

plotly_motif_subnet(motif, m[, type, threshold])

Plots a subnet of motifs.