cell2clone.permutation_test
- cell2clone.permutation_test(df, reference_celltype, value_col='clone_size_score', celltype_col='cell_type', sample_col='sample_id', percentile=0.99, n_perms=10000, min_samples=10, random_state=0)
Test whether a cell type contains more highly clonal samples than a reference cell type.
The threshold is defined from a percentile of the reference cell type, and significance is assessed by permutation of cell-type labels.
Parameters
- dfpandas.DataFrame
Sample-level clonality metrics.
- reference_celltypestr
Cell type used to define the threshold.
…
Returns
- pandas.DataFrame
Permutation test results with raw and FDR-adjusted p-values.