Skip to content

Commit cee139f

Browse files
authored
Merge pull request #443 from deeptools/develop
Develop
2 parents 6627801 + 4c8e796 commit cee139f

Some content is hidden

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

45 files changed

+6524
-449
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
HiCExplorer
1111
===========
1212

13-
Set of programs to process, analyze and visualize Hi-C data
14-
-----------------------------------------------------------
13+
Set of programs to process, analyze and visualize Hi-C and cHi-C data
14+
---------------------------------------------------------------------
1515

1616
Sequencing techniques that probe the 3D organization of the genome generate large amounts of data whose processing,
1717
analysis and visualization is challenging. Here, we present HiCExplorer, a set of tools for the analysis and

bin/hicPlotSVL

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

docs/content/News.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
News and Developments
22
=====================
33

4+
Release 3.3
5+
-----------
6+
**8 October 2019**
7+
8+
- Fixing many bugs:
9+
- A bug in hicDetectLoops if a sub-matrix was very small
10+
- A bug in hicPlotMatrix if the region defined by --region was only a chromosome and loops should be plotted too
11+
- A bug in hicPlotMatrix if a loop region should be plotted and chromosomeOrder argument was used too
12+
- A bug in hicAggregateContacts (issue #405) if chromosomes were present in the matrix but not in the bed file
13+
- A bug in hicAdjustMatrix concerning a bed file and consecutive regions, see issue #343
14+
- A bug in hicAdjustMatrix if a chromosome is present in the matrix but not in the bed file, see issue #397
15+
- A bug in hicCompartmentsPolarization concerning the arguments 'quantile' and 'outliers' were interpreted as strings but should be integers
16+
- A bug in hicAdjustMatrix concerning the 'keep' option and how matrices are reordered internally. Thanks @LeilyR
17+
18+
- Added features as requested:
19+
- hicPCA ignores now masked bins, see issue #342
20+
- chicPlotViewpoint:
21+
- Better legend handling on x-axis
22+
- Peaks are now display with their fill width
23+
- Add option `--pValueSignificantLevels` to categorize the p-values in x levels (e.g. 0.001 0.05 0.1)
24+
- chicViewpoint:
25+
- adding sorting via viewpoints and not by samples option (--allViewpointsList)
26+
- Adding an option to hicNormalize to normalize via multiplication and a use defined value (see issues #385, #424)
27+
28+
- Rearrange hicAdjustMatrix to have a better accessibility to its functions from outside of main
29+
- Improving the documentation and fixing grammar / spelling mistakes. Thanks @simonbray
30+
- New script: hicPlotSVL to investigate short range vs long range ratios.
31+
32+
433
Release 3.2
534
-----------
635
** 22 August 2019**

docs/content/capture-Hi-C.rst

Lines changed: 43 additions & 44 deletions
Large diffs are not rendered by default.

docs/content/list-of-tools.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ HiCExplorer tools
6666
| | | one PCA bedgraph file | polarization plot | |
6767
+--------------------------------------+------------------+-----------------------------------+---------------------------------------------+-----------------------------------------------------------------------------------+
6868
|:ref:`hicPlotAverageRegions` | visualization | one npz file | one image | Visualization of hicAverageRegions. |
69+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
70+
|:ref`hicPlotSVL` | analysis | one / multiple Hi-C matrices | one image, p-values file, raw data file | Computes short/long range contacts; a box plot, a p-value and raw data file |
6971
+--------------------------------------+------------------+-----------------------------------+---------------------------------------------+-----------------------------------------------------------------------------------+
7072
|:ref:`hicMergeTADbins` | preprocessing | one Hi-C matrix, one BED file | one Hi-C matrix | Uses a BED file of domains or TAD boundaries to merge the |
7173
| | | | | bin counts of a Hi-C matrix. |
@@ -167,6 +169,8 @@ Tools for Hi-C data analysis
167169
""""""""""""""""""""
168170
:ref:`hicCompartmentsPolarization`
169171
""""""""""""""""""""""""""""""""""
172+
:ref:`hicPlotSVL`
173+
""""""""""""""""""""""""""""""""""
170174

171175
Tools for TADs processing
172176
^^^^^^^^^^^^^^^^^^^^^^^^^

docs/content/tools/hicPlotSVL.rst

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.. _hicPlotSVL:
2+
3+
hicPlotSVL
4+
==========
5+
6+
.. contents::
7+
:local:
8+
9+
Description
10+
^^^^^^^^^^^
11+
12+
hicPlotSVL computes the ratio between short range and long range contacts per chromosome independently. Per sample one box plot is created and, if more than one sample is given,
13+
the computed ratios are assumed to be one distribution and a Wilcoxon rank-sum test under H0 'distributions are equal' is computed. All used data is written to a third raw data file.
14+
15+
The distance to distinct short and long range contacts can be set via the `--distance` parameter; for short range the sum for all contacts smaller or equal this distance are computed, for long range contacts all contacts greater this distance.
16+
17+
18+
Usage example
19+
^^^^^^^^^^^^^^
20+
21+
.. code-block:: bash
22+
$ hicPlotSVL -m hmec_10kb.cool nhek_10kb.cool hmec_10kb.cool --distance 2000000 --threads 4 --plotFileName plot.png --outFileName pvalues.txt --outFileNameData rawData.txt
23+
24+
25+
This results in three files:
26+
27+
The raw data containing the sums for short range, long range and ratio per sample and chromosome.
28+
29+
.. code-block:: INI
30+
31+
# Created with HiCExplorer's hicPlotSVL 3.3
32+
# Short range vs long range contacts per chromosome: raw data
33+
# Short range contacts: <= 2000000
34+
# hmec_10kb.cool nhek_10kb.cool hmec_10kb.cool
35+
# Chromosome Ratio Sum <= 2000000 Sum > 2000000 Ratio Sum <= 2000000 Sum > 2000000 Ratio Sum <= 2000000 Sum > 2000000
36+
1 3.0399769346724543 33476834 11012200 2.79740105237572 44262902 15822866 3.0399769346724543 33476834 11012200
37+
2 2.7532203542810625 31723954 11522490 2.5007877714355438 47468438 18981394 2.7532203542810625 31723954 11522490
38+
3 2.922650759458664 26251027 8981924 2.6235211241878442 39640848 15109788 2.922650759458664 26251027 8981924
39+
4 2.7235598858451637 22474680 8251950 2.5572455199457864 37486882 14659086 2.7235598858451637 22474680 8251950
40+
5 2.9585962905193712 22716268 7678056 2.752922527526723 35445722 12875670 2.9585962905193712 22716268 7678056
41+
6 3.168274165465025 22872690 7219290 2.8602111006131703 33990211 11883812 3.168274165465025 22872690 7219290
42+
7 3.1093346580597516 19603416 6304698 2.8021236966788887 29712823 10603680 3.1093346580597516 19603416 6304698
43+
8 3.135391026076832 18355087 5854162 2.7964394470859024 28660624 10248970 3.135391026076832 18355087 5854162
44+
9 4.1147978383348125 15395763 3741560 3.819940066283481 21994046 5757694 4.1147978383348125 15395763 3741560
45+
10 3.448063050802953 17964043 5209894 3.1116673856502253 26270171 8442474 3.448063050802953 17964043 5209894
46+
11 3.5924666993070407 18651850 5191934 3.1364875011923035 26240350 8366158 3.5924666993070407 18651850 5191934
47+
12 3.6817551043464416 18640866 5063038 3.306662109403207 26101554 7893626 3.6817551043464416 18640866 5063038
48+
13 3.476204237522881 11018462 3169682 3.0976674036654805 18922281 6108558 3.476204237522881 11018462 3169682
49+
14 3.70550850832778 11164875 3013048 3.6226817463785164 17245704 4760480 3.70550850832778 11164875 3013048
50+
15 4.607631079612186 11165313 2423222 4.567998349104569 15273742 3343640 4.607631079612186 11165313 2423222
51+
16 4.397874357146307 10745775 2443402 3.890983210350018 14666462 3769346 4.397874357146307 10745775 2443402
52+
17 5.809374740402161 12168235 2094586 5.3360710927739285 14154110 2652534 5.809374740402161 12168235 2094586
53+
18 3.7647349280938895 9339833 2480874 3.485487446356812 15019063 4309028 3.7647349280938895 9339833 2480874
54+
19 6.492239632778196 8466283 1304062 5.774337450385819 9368978 1622520 6.492239632778196 8466283 1304062
55+
20 5.542933774973686 8962935 1617002 4.977679877778358 12009479 2412666 5.542933774973686 8962935 1617002
56+
21 6.665622315255486 3910374 586648 6.1843701763589225 6554715 1059884 6.665622315255486 3910374 586648
57+
22 8.063663557923096 4992327 619114 7.433759425439728 5932928 798106 8.063663557923096 4992327 619114
58+
X 2.208752982178897 14424173 6530460 2.3130534357407995 27628734 11944702 2.208752982178897 14424173 6530460
59+
Y 4.165021803993573 36294 8714 3.8063291139240505 45105 11850 4.165021803993573 36294 8714
60+
MT
61+
62+
63+
The p-values between the samples:
64+
65+
.. code-block:: INI
66+
67+
# Created with HiCExplorer's hicPlotSVL 3.3
68+
# Short range vs long range contacts per chromosome, p-values of each distribution against each other distribution with Wilcoxon rank-sum
69+
# Short range contacts: <= 2000000
70+
hmec_10kb.cool nhek_10kb.cool 0.28362036331636575
71+
hmec_10kb.cool hmec_10kb.cool 1.0
72+
nhek_10kb.cool hmec_10kb.cool 0.28362036331636575
73+
74+
75+
The box plot:
76+
77+
.. image:: ../../images/plot_svl.png

docs/images/plot_svl.png

66.5 KB
Loading

docs/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
HiCExplorer
22
===========
33

4-
Set of programs to process, normalize, analyze and visualize Hi-C data
5-
----------------------------------------------------------------------
4+
Set of programs to process, normalize, analyze and visualize Hi-C and cHi-C data
5+
--------------------------------------------------------------------------------
66

77
HiCExplorer addresses the common tasks of Hi-C data analysis from processing to visualization.
88

@@ -61,6 +61,7 @@ tool description
6161
:ref:`chicAggregateStatistic` Compiling of target regions for two samples as input for differential analysis
6262
:ref:`chicDifferentialTest` Differential analysis of interactions of two samples
6363
:ref:`chicPlotViewpoint` Plotting of viewpoint with background model and highlighting of significant and differential regions
64+
:ref:`hicPlotSVL` Computing short vs long range contacts and plotting the results
6465
=================================== ==========================================================================================================================================================
6566

6667

hicexplorer/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import logging
22
# logging.basicConfig(level=logging.DEBUG)
33
logging.basicConfig(level=logging.INFO)
4-
logging.getLogger('matplotlib').setLevel(logging.WARNING)
5-
logging.getLogger('cooler').setLevel(logging.WARNING)
6-
logging.getLogger('hicmatrix').setLevel(logging.WARNING)
4+
logging.getLogger('matplotlib').setLevel(logging.ERROR)
5+
logging.getLogger('cooler').setLevel(logging.ERROR)
6+
logging.getLogger('hicmatrix').setLevel(logging.ERROR)
7+
logging.getLogger('numexpr').setLevel(logging.ERROR)
78

89

910
import warnings

hicexplorer/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file is originally generated from Git information by running 'setup.py
33
# version'. Distribution tarballs contain a pre-generated copy of this file.
44

5-
__version__ = '3.2'
5+
__version__ = '3.3'

0 commit comments

Comments
 (0)