Skip to content

Commit 6c23627

Browse files
authored
Merge pull request #615 from deeptools/develop
Develop
2 parents 9756fe5 + b1f6831 commit 6c23627

File tree

9 files changed

+30
-13
lines changed

9 files changed

+30
-13
lines changed

docs/content/News.rst

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

4+
Release 3.5.3
5+
-------------
6+
**14 October 2020**
7+
8+
- Bug fix release:
9+
- Reads from scaffolds without any restriction enzym cut site are considered as 'same fragment'. An appearance of such a read will not lead to a crash anymore
10+
- Minor documentation improvements
11+
412

513
Release 3.5.2
614
-------------

docs/content/list-of-tools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Capture Hi-C analysis
8383
tools/chicDifferentialTest
8484
tools/chicPlotViewpoint
8585

86-
.. contents::
87-
:local:
86+
87+
For single-cell Hi-C data analysis please use `scHiCExplorer <https://schicexplorer.readthedocs.io/>`__ .
8888

8989

9090
+--------------------------------------+------------------+-----------------------------------+---------------------------------------------+-----------------------------------------------------------------------------------+

docs/content/tools/chicViewpoint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _chicViewpoint:
22

33
chicViewpoint
4-
===============
4+
=============
55

66
.. argparse::
77
:ref: hicexplorer.chicViewpoint.parse_arguments

docs/content/tools/hicBuildMatrix.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ The lower resolutions need to be an integer multiplicative of the highest resolu
2727
Introducing with version 3.5 we support multiple restriction and dangling end sequences, and multiple restriction cut site files.
2828
Hi-C protocols that use multiple restriction cut enzymes benefit from this and get now an improved QC report.
2929
Version 3.5 adds also the support for a chromosome size file which can help to get interaction matrices with a predefined size. Capture Hi-C or
30-
single-cell Hi-C data, where it is not guaranteed that reads from all areas of the chromosome are present benefit from this latest improvement.
30+
single-cell Hi-C data, where it is not guaranteed that reads from all areas of the chromosome are present benefit from this latest improvement.
31+
32+
33+
Missing scaffolds or contigs in the Hi-C matrix
34+
-----------------------------------------------
35+
36+
Restriction enzymes cut the DNA at their specific restriction cut site sequences. It can occur for scaffolds or contigs (less likely it happens for chromosomes) that it does not contain any of these cut sites.
37+
In this case, the reads from this scaffold or contig are considered as invalid and are part of the 'same restriction fragment'-statistics in the QC report.

docs/content/tools/hicDetectLoops.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _hicDetectLoops:
22

33
hicDetectLoops
4-
===============
4+
==============
55

66
hicDetectLoops can detect enriched interaction regions (peaks / loops) based on a strict candidate selection, negative binomial distributions
77
and Wilcoxon rank-sum tests.

docs/content/tools/hicTransform.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hicTransform
99

1010

1111
Background
12-
===========
12+
----------
1313

1414
hicTransform transforms a given input matrix into a new matrix using one of the following methods:
1515

docs/content/tools/hicValidateLocations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _hicValidateLocations:
22

33
hicValidateLocations
4-
=====================
4+
====================
55

66
hicValidateLoops is a tool to compare the detect loops from hicDetectLoops (or from any other software as long as the data format is followed, see below)
77
with known peak protein locations to validate if the computed loops do have the expected anchor points. For example, loops in mammals are usually bound by CTCF or Cohesin,
@@ -13,7 +13,7 @@ therefore it is important to know if the detect loops have protein peaks at thei
1313

1414

1515
Data format
16-
===========
16+
-----------
1717

1818
The data format of hicDetectLoops output is:
1919

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.5.2'
5+
__version__ = '3.5.3'

hicexplorer/hicBuildMatrix.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from os import unlink
66
import os
77
from io import StringIO
8+
import traceback
89
import warnings
910
warnings.simplefilter(action="ignore", category=RuntimeWarning)
1011
warnings.simplefilter(action="ignore", category=PendingDeprecationWarning)
@@ -1002,8 +1003,9 @@ def process_data(pMateBuffer1, pMateBuffer2, pMinMappingQuality,
10021003
len(restrictionSequence)
10031004
frag_end = max(mate1.pos + mate1.qlen, mate2.pos + mate2.qlen) - len(restrictionSequence)
10041005
mate_ref = pRefId2name[mate1.rname]
1005-
has_rf.extend(sorted(
1006-
pRfPositions[mate_ref][frag_start: frag_end]))
1006+
if mate_ref in pRfPositions:
1007+
has_rf.extend(sorted(
1008+
pRfPositions[mate_ref][frag_start: frag_end]))
10071009

10081010
# case when there is no restriction fragment site between the
10091011
# mates
@@ -1071,7 +1073,7 @@ def process_data(pMateBuffer1, pMateBuffer2, pMinMappingQuality,
10711073
mate_not_close_to_rf, count_inward, count_outward,
10721074
count_left, count_right, inter_chromosomal, short_range, long_range, pair_added, len(pMateBuffer1), pResultIndex, pCounter, out_bam_index_buffer]])
10731075
except Exception as exp:
1074-
pQueueOut.put('Fail: ' + str(exp))
1076+
pQueueOut.put('Fail: ' + str(exp) + traceback.format_exc())
10751077
return
10761078
return
10771079

@@ -1147,7 +1149,7 @@ def main(args=None):
11471149
rf_interval.extend(bed2interval_list(restrictionCutFile))
11481150

11491151
rf_positions = intervalListToIntervalTree(rf_interval)
1150-
1152+
log.debug('rf_positions {}'.format(rf_positions.keys()))
11511153
if args.binSize:
11521154
bin_intervals = get_bins(args.binSize[0], chrom_sizes, args.region)
11531155
else:

0 commit comments

Comments
 (0)