.tests

proteopy.get.tests(adata)[source]

Retrieve a summary of all differential abundance tests stored in .varm.

Scans the .varm slots of the AnnData object for statistical test results and returns a DataFrame summarizing the tests performed.

Parameters:

adata (AnnData) – Annotated data object containing differential abundance results in .varm.

Returns:

DataFrame with columns:

  • key: The .varm slot name.

  • key_group: String identifier for the test group in format "<test_type>;<group_by>;<design_mode>" or "<test_type>;<group_by>;<design_mode>;<layer>" if a layer was used.

  • test_type: The statistical test type (e.g., "ttest_two_sample").

  • group_by: The .obs column used for grouping.

  • design: Underscore-separated design identifier (e.g., "A_vs_rest").

  • design_label: Human-readable description of what the test compares.

  • design_mode: Either "one_vs_rest" or "one_vs_one".

  • layer: The layer used for the test, or None if .X was used.

Return type:

pandas.DataFrame

Examples

>>> import proteopy as pp
>>> # After running differential abundance tests
>>> tests_df = pp.get.tests(adata)
>>> tests_df
                         key               key_group  ...  design_mode
0  welch;condition;A_vs_rest  welch;condition;one_vs_rest  ...  one_vs_rest
1  welch;condition;B_vs_rest  welch;condition;one_vs_rest  ...  one_vs_rest