chicDifferentialTest tests if two locations under consideration of the reference point have a different interaction count. For this either Fisher’s test or chi2 contingency test can be used. The files that are accepted for this test can be created with chicAggregateStatistic. H0 is assuming the interactions are not different. Therefore the differential interaction counts are all where H0 was rejected.

An example usage is:

$ chicDifferentialTest –interactionFile viewpoint1_aggregated.bed viewpoint2_aggregated.bed –alpha 0.05 –statisticTest fisher –outputFolder differentialResults

and this will create three files: viewpoint1_viewpoint2_aggregated_H0_accepted.bed, viewpoint1_viewpoint2_aggregated_H0_rejected.bed, viewpoint1_viewpoint2_aggregated_results.bed

The first file contains all locations where H0 was accepted, the second file all locations where H0 was rejected and the third one all locations with the test result.

A second mode is the batch processing mode, for this you need a file containing the names of the aggregated files (generated by chicAggregateStatistic via –writeFileNamesToFile and the batch mode):

$ chicDifferentialTest –statisticTest fisher –alpha 0.05 –interactionFile aggregatedFilesBatch.txt –interactionFileFolder aggregatedFilesFolder –batchMode –threads 20 –outputFolder differentialResults

This will create, as in the non-batch mode, three files per aggregated file and writes the file name to the file given by –rejectedFileNamesToFile. This last file can be used to plot the differential interactions per viewpoint in batch mode by chicPlotViewpoint.

usage: chicDifferentialTest --interactionFile INTERACTIONFILE
                            [INTERACTIONFILE ...] --alpha ALPHA
                            [--interactionFileFolder INTERACTIONFILEFOLDER]
                            [--outputFolder OUTPUTFOLDER]
                            [--statisticTest {fisher,chi2}] [--batchMode]
                            [--threads THREADS]
                            [--rejectedFileNamesToFile REJECTEDFILENAMESTOFILE]
                            [--help] [--version]

Required arguments

--interactionFile, -if

path to the interaction files which should be used for differential test.

--alpha, -a

Accept all samples to significance level alpha

Default: 0.05

Optional arguments

--interactionFileFolder, -iff

Folder where the interaction files are stored in. Applies only for batch mode.

Default: “.”

--outputFolder, -o

Output folder of the files.

Default: “differentialResults”


Possible choices: fisher, chi2

Type of test used for testing: fisher’s exact test or chi2 contingency

Default: “fisher”

--batchMode, -bm

The given file for –interactionFile and or –targetFile contain a list of the to be processed files.

Default: False

--threads, -t

Number of threads. Using the python multiprocessing module.

Default: 4

--rejectedFileNamesToFile, -r

Writes the names of the rejected H0 (therefore containing the differential interactions) to file. Can be used for batch processing mode of chicPlotViewpoint.

Default: “rejected_H0.txt”


show program’s version number and exit