atlas_protocol_scripts.tl.scissor_wilcoxon_test#

atlas_protocol_scripts.tl.scissor_wilcoxon_test(df, pos_col='scissor+', neg_col='scissor-')#

Tests if the fractions of scissor+ cells is significantly different from the fraction of scissor- cells.

Applies a wilcoxon test on the scissor+ vs. scissor- fractions.

Parameters
  • df (DataFrame) – a data frame where each row is a biological replicate (e.g. patient) and there are at least two columns with the fractions of scissor+ and scissor- cells, respectively.

  • pos_col (str (default: 'scissor+')) – column in df that contains the fraction of scissor+ cells

  • neg_col (str (default: 'scissor-')) – column in df that contains the fraction of scissor- cells

Return type

Series

Returns

a Series with the following columns: * pos_col: the mean fraction across all patients in pos_col * neg_col: the mean fraction across all patisn in neg_col * pvalue: the p-value as computed using the wilcoxon test * log2_ratio: The log2 ratio of mean fractions. Computed as log2(mean(pos_col)) - log2(mean(neg_col)).