Skip to content

Commit 7168497

Browse files
authored
Merge pull request #215 from deeptools/2.0.1-bugfix
2.1 release
2 parents 87b032f + 1b558bc commit 7168497

File tree

87 files changed

+4063
-2265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+4063
-2265
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ before_install:
4848

4949
# Install packages
5050
install:
51-
- conda create --name hicexplorer_pytest --yes python=$TRAVIS_PYTHON_VERSION pytest
52-
- source activate hicexplorer_pytest
53-
- conda install --yes -c bioconda -c conda-forge -c defaults --file requirements.txt
51+
- conda install --yes -c conda-forge -c bioconda python=$TRAVIS_PYTHON_VERSION --file requirements.txt
52+
- conda install --yes -c conda-forge -c bioconda pytest
5453
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then conda install --yes -c defaults -c conda-forge -c bioconda configparser ; fi
5554
- python setup.py install
5655

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ any type of genomic scores), long range contacts and the visualization of viewpo
2727
Citation:
2828
^^^^^^^^^
2929

30-
Fidel Ramirez, Vivek Bhardwaj, Laura Arrigoni, Kin Chung Lam, Bjoern A Gruening, Jose Villaveces, Bianca Habermann, Asifa Akhtar, Thomas Manke
31-
**"High-resolution TADs reveal DNA sequences underlying genome organization in flies". Nature Communications (2018)**; doi:10.1038/s41467-017-02525-w
30+
31+
Fidel Ramirez, Vivek Bhardwaj, Jose Villaveces, Laura Arrigoni, Bjoern A Gruening, Kin Chung Lam, Bianca Habermann, Asifa Akhtar, Thomas Manke.
32+
**"High-resolution TADs reveal DNA sequences underlying genome organization in flies". Nature Communications**, Volume 9, Article number: 189 (2018), doi: https://doi.org/10.1038/s41467-017-02525-w
33+
3234

3335
.. image:: ./docs/images/hicex2.png
3436

bin/hicAggregateContacts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
from hicexplorer.hicAggregateContacts import main
5+
6+
if __name__ == "__main__":
7+
main()
8+

bin/hicTransform

100644100755
File mode changed.

docs/content/HiCExport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ for differential Hi-C analysis.
9595

9696
- For more information on working with GInteraction and InteractionSet
9797
objects in bioconductor check out `this
98-
vingette <https://bioconductor.org/packages/devel/bioc/vignettes/InteractionSet/inst/doc/interactions.html>`__.
98+
vignette <https://bioconductor.org/packages/devel/bioc/vignettes/InteractionSet/inst/doc/interactions.html>`__.

docs/content/example_usage.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ plot the counts using the `--log1p` option.
160160
:align: center
161161

162162
Corrected Hi-C counts in log scale.
163+
164+
165+
Quality control of Hi-C data and biological replicates comparison
166+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167+
168+
HiCExplorer integrates multiple tools that allow the evualuation of the quality of Hi-C libraries and matrices.
169+
170+
- hicQC on the log files produced by hicBuildMatrix and control of the pdf file produced.
171+
Proportion of useful reads is important to assess the efficiency of the HiC protocol, which is dependant of
172+
proportion of dangling ends detected...
173+
Proportion of inter chromosomal, short range and long range contacts are important for....
174+
175+
- hicPlotDistVsCounts to compare the distribution of corrected Hi-C counts in relation with the genomic
176+
distance between multiple samples. If some differences are observed between biological replicates,
177+
these can be investigated more precisely by computing log2ratio matrices.
178+
179+
- hicCompareMatrices log2ratio of matrices of biological replicates to identify where the potential changes
180+
are located.
181+
182+
- hicPlotPCA bins correlation of two biological replicates.
163183

164184

165185
TAD calling

docs/content/list-of-tools.rst

Lines changed: 142 additions & 54 deletions
Large diffs are not rendered by default.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _hicAggregateContacts:
2+
3+
hicAggregateContacts
4+
====================
5+
6+
.. contents::
7+
:local:
8+
9+
Background
10+
^^^^^^^^^^
11+
12+
``hicAggregateContacts`` is a tool that allows plotting of aggregated Hi-C sub-matrices of a specified list of positions. Positions of interest can for example be binding sites of a specific protein that were determined by ChIP-seq or genetic elements as transcription start sites of active genes.
13+
14+
Description
15+
^^^^^^^^^^^
16+
17+
.. argparse::
18+
:ref: hicexplorer.hicAggregateContacts.parse_arguments
19+
:prog: hicAggregateContacts
20+
21+
Usage example
22+
^^^^^^^^^^^^^
23+
24+
Below, you can find an example of an aggregate Hi-C matrix obtained from *Drosophila melanogaster* Hi-C data. The interactions are plotted at binding sites of a protein that were determined by ChIP-seq. We plot sub-matrices of 30 bins (1.5 kb bin size, 45 kb in total). The regions specified in the BED file will be centered between half number of bins and the other half number of bins.The considered range is 300-1000 kb. The range should be adjusted and only contain contacts larger than TAD size to reduce background interactions.
25+
26+
.. code-block:: bash
27+
28+
$ hicAggregateContacts --matrix Dmel.h5 --BED ChIP-seq-peaks.bed \
29+
--outFileName Dmel_aggregate_Contacts --vMin 0.8 --vMax 2.2 \
30+
--range 300000:1000000 --numberOfBins 30 --chromosomes X \
31+
--avgType mean --transform obs/exp
32+
33+
.. image:: ../../images/hicAggregateContacts.png
34+
35+
This example was calculated using mean interactions of an observed vs expected transformed Hi-C matrix. Additional options for the matrix transformation are total-counts or z-score. Aggregate contacts can be plotted in 2D or 3D.
Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
11
.. _hicCompareMatrices:
22

3-
hicCorrectMatrix
4-
================
3+
hicCompareMatrices
4+
==================
5+
6+
.. contents::
7+
:local:
8+
9+
Background
10+
^^^^^^^^^^
11+
12+
This tool is useful to compare two matrices in .h5 format by applying operations like difference, ratio or log2ratio after normalization. This can be used to determine the effect of a mutation compared to wild-type samples on contact enrichment, or to see TAD structure modifications near differentially expressed genes between two conditions when followed by :doc:`hicPlotMatrix`. It can also be used to compare two biological replicates.
13+
14+
Description
15+
^^^^^^^^^^^
516

617
.. argparse::
718
:ref: hicexplorer.hicCompareMatrices.parse_arguments
819
:prog: hicCompareMatrices
920

21+
Usage example
22+
^^^^^^^^^^^^^
23+
24+
``hicCompareMatrices`` is usually perfomed on corrected matrices (:doc:`hicCorrectMatrix`) with bins merged (:doc:`hicMergeMatrixBins`) depending on the downstream analyses to perform. Here is an example of a log2ratio comparison between M1BP Knockdown and GST cells in *Drosophila melanogaster* on corrected matrices with 50 bins merged (about 30kb bins).
25+
26+
.. code:: bash
27+
28+
hicCompareMatrices -m \
29+
M1BP_KD_merge_m50_corrected.h5 \
30+
GST_merge_rf_m50_corrected.h5 \
31+
--operation log2ratio -o m1bp_over_gst_log2_m50.h5
32+
33+
This code outputs a matrix containing the normalized log2ratio values of M1BP_KD_merge_m50_corrected.h5 over GST_merge_rf_m50_corrected.h5. We can then display this matrix using :doc:`hicPlotMatrix`.
34+
35+
.. code:: bash
36+
37+
hicPlotMatrix -m \
38+
m1bp_over_gst_log2_m50.h5 \
39+
--clearMaskedBins \
40+
--region chr2L:12,000,000-19,000,000 \
41+
--vMin -4 --vMax 4 \
42+
-o m1bp_over_gst_log2_m50_matrix_plot.png
43+
44+
.. image:: ../../images/hicCompareMatrices_m1bp_over_gst_log2_m50_matrix_plot.png
45+
46+
In this plot we see that the cells with a M1BP Knockdown display a negative log2ratio compared to the wild-type. Depletion of M1BP thus show a dramatic effect on the distribution of Hi-C contacts in which short range contacts decrease (Ramirez *et al.* 2017, High-resolution TADs reveal DNA sequences underlying genome organization in flies, https://doi.org/10.1038/s41467-017-02525-w).
47+
48+
Below you can find an example of a log2ratio plot between Hi-C matrices of two biological replicates, no differences are observable which means that the replicates are well correlated.
49+
50+
.. image:: ../../images/hicCompareMatrices_QC_log2_m50_matrix_plot.png

docs/content/tools/hicCorrectMatrix.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
hicCorrectMatrix
44
================
55

6+
.. contents::
7+
:local:
8+
69
.. argparse::
710
:ref: hicexplorer.hicCorrectMatrix.parse_arguments
811
:prog: hicCorrectMatrix

0 commit comments

Comments
 (0)