# hicQC¶

## Background¶

This tool can process quality control log files produced by hicBuildMatrix for multiple samples at once to generate summary tables and plots of quality control (QC) measures for all these samples. Additionally, an HTML output is generated where all summary tables and plots are displayed.

## Description¶

Tabulates and plots QC measures from hicBuildMatrix log files within an HTML output

usage: hicQC --logfiles matrix1_QCfolder/QC.log matrix2_QCfolder/QC.log --labels "sample 1" "sample 2" --outputFolder QC_all_samples)


### Required arguments¶

--logfiles, -l

Path to the log files to be processed

--labels

Label to assign to each log file. Each label should be separated by a space. Quote labels that contain spaces: E.g. –labels label1 “labels 2”

--outputFolder, -o

Several files with be saved under this folder: A table containing the results and a html file with several images.

### Optional arguments¶

--dpi

Image resolution. By default high resolution png images with a 200 dpi are created.

Default: 200

--version

show program’s version number and exit

## Usage example¶

hicBuildMatrix generates a QC.log file for each processed Hi-C sample in a folder specified in the --QCfolder argument. The quality control measures stored for each of these samples can be merged in summary tables and plots using hicQC. An example usage is:

\$ hicQC --logfiles ./sample_1/QC.log ./sample_2/QC.log /sample_3/QC.log \
--labels "Sample 1" "Sample 2" "Sample 3" \
-o QC_plots


This command will generate several plots that are described in details below.

On the plot above, we can see how many reads were sequenced per sample (Sequenced reads), how many reads were mappable, unique and of high quality and how many reads passed all quality controls and are thus useful for further analysis (Hi-C contacts). All quality controls used for read filtering are explained below.

The figure above contains the fraction of reads with respect to the total number of reads that did not map, that have a low quality score or that didn’t map uniquely to the genome. In our example we can see that Sample 3 has the highest fraction of Hi-C contacts. We explain the differences between the three samples on the plot below.

This figure contains the fraction of read pairs (with respect to mappable and unique reads) that were discarded when building the Hi-C matrix. You can find the description of each category below:

Dangling ends: reads that start with the restriction site and constitute reads that were digested but not ligated. Sample 1 in our example has a high fraction of dangling ends (and thus a low proportion of Hi-C contacts). Reasons for this can be inefficient ligation or insufficient removal of danging ends during samples preparation.

Duplicated pairs: reads that have the same sequence due to PCR amplification. For example, Sample 2 was amplified too much and thus has a very high fraction of duplicated pairs.

Same fragment: read mates facing inward, separated by up to 800bp that do not have a restriction enzyme site in between. These read pairs are not valid Hi-C pairs and are thus discarded from further analyses.