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

An example usage is:

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

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

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, using 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 the differential test.

--alpha, -a

define a significance level (alpha) for accepting samples

Optional arguments

--interactionFileFolder, -iff

Folder where the interaction files are stored. Applies only for batch mode (Default: “.”).

Default: “.”

--outputFolder, -o

Output folder of the files (Default: “differentialResults”).

Default: “differentialResults”


Possible choices: fisher, chi2

Type of test used: fisher’s exact test or chi2 contingency (Default: “fisher”).

Default: “fisher”

--batchMode, -bm

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

Default: False

--threads, -t

Number of threads (uses the python multiprocessing module) (Default: 4).

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”).

Default: “rejected_H0.txt”


show program’s version number and exit