26. dmc_ttest.py — CpGtools documentation

# 26. dmc_ttest.py

## 26.1. Description

Differential CpG analysis using T test for two groups comparison or ANOVA for multiple groups comparison.

## 26.2. Options

> `--version`

>   show program’s version number and exit

> `-h, --help`

>   show this help message and exit

> `-i INPUT_FILE, --input_file=INPUT_FILE`

>   Data file containing beta values with the 1st row containing sample IDs (must be unique) and the 1st column containing CpG positions or probe IDs (must be unique). Except for the 1st row and 1st column, any non-numerical values will be considered as “missing values” and ignored. This file can be a regular text file or compressed file (.gz, .bz2).

> `-g GROUP_FILE, --group=GROUP_FILE`

>   Group file defining the biological group of each sample. It is a comma-separated 2 columns file with the 1st column containing sample IDs, and the 2nd column containing group IDs. It must have a header row. Sample IDs should match to the “Data file”. Note: automatically switch to use ANOVA if more than 2 groups were defined in this file.

> `-p, --paired`

>   If True, performs a paired t-test (the paired sampels are matched by the order). If False, performs a standard independent 2 sample t-test. default=False

> `-w, --welch`

>   If True, performs Welch’s t-test which does not assume the two samples have equal variance. If False, performs a standard two-sample t-test (i.e. assuming the two samples have equal variance). default=False

> `-o OUT_FILE, --output=OUT_FILE`

>   The prefix of the output file.

## 26.3. Input files (examples)

- test_05_TwoGroup.tsv.gz

- test_05_TwoGroup.grp.csv

- test_06_ThreeGroup.tsv.gz

- test_06_ThreeGroup.grp.csv

## 26.4. Command

    #Two group comparison. Compare normal livers to HCV-related cirrhosis livers
    $dmc_ttest.py -i test_05_TwoGroup.tsv.gz -g test_05_TwoGroup.grp.csv -o ttest_2G

    #Three group comparison. Compare normal livers, HCV-related cirrhosis livers, and liver cancers
    $dmc_ttest.py -i test_06_ThreeGroup.tsv.gz -g test_06_ThreeGroup.grp.csv -o ttest_3G

## 26.5. Output files

- ttest_2G.pval.txt

- ttest_3G.pval.txt