pseudodynamics.de_test._association_test

Functions

run_association_test_parallel(gam_fit, ...)

Run association tests in parallel within specified pseudotime range

Classes

AssociationTest(gam_fit, lineage_names)

Python implementation of tradeSeq associationTest

PseudotimeRestrictedAssociationTest(gam_fit, ...)

Association test restricted to specific pseudotime range

class pseudodynamics.de_test._association_test.AssociationTest(gam_fit, lineage_names)[source]

Bases: object

Python implementation of tradeSeq associationTest

Parameters:
  • gam_fit (dict) – The result of pdp.de_test.fitGAM

  • lineage_names (list) – the names of lineages, lineage can be determined by tools like palantire or cellrank

Example

>>> gam_fit = de_test.run_fitGAM_parallel(expression_matrix, cell_time, genes, n_cores=10)
>>> test = de_test.AssociationTest(gam_fit, ['Ery'])
>>> result_lin_day = test.association_test(restrcited_pseudotime=pseudotime_range)
class pseudodynamics.de_test._association_test.PseudotimeRestrictedAssociationTest(gam_fit, lineage_names, pseudotime_range=None)[source]

Bases: AssociationTest

Association test restricted to specific pseudotime range

association_test(*args, pseudotime_range=None, **kwargs)[source]

Override to allow specifying pseudotime range

Parameters: pseudotime_range: tuple (min, max) for pseudotime filtering

pseudodynamics.de_test._association_test.run_association_test_parallel(gam_fit, pseudotime_range, chunk_size=10, n_cores=20)[source]

Run association tests in parallel within specified pseudotime range

Parameters: gam_fit: fitted GAM models pseudotime_range: tuple (min, max) for pseudotime filtering n_cores: number of CPU cores to use

Returns: DataFrame with results