Skip to content

Commit

Permalink
Changing pca test case to check only absolute values. Increase versio…
Browse files Browse the repository at this point in the history
…n number to 2.1.4
  • Loading branch information
joachimwolff committed May 25, 2018
1 parent 4dc42e2 commit 7f5a6dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hicexplorer/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# This file is originally generated from Git information by running 'setup.py
# version'. Distribution tarballs contain a pre-generated copy of this file.

__version__ = '2.1.3'
__version__ = '2.1.4'
7 changes: 3 additions & 4 deletions hicexplorer/test/test_hicPCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def are_files_equal(file1, file2):
split_x = x.split('\t')
split_y = y.split('\t')
if split_x[0] == split_y[0] and split_x[1] == split_y[1] and split_x[2] == split_y[2]:
if float(split_x[3]) == float(split_y[3]) * -1:
if abs(float(split_x[3])) == abs(float(split_y[3])):
continue
equal = False
break
Expand All @@ -47,9 +47,8 @@ def are_files_equal_bigwig(file1, file2):
# sometimes the values are + / - flipped

if bins_list_file1 is not None and bins_list_file1[0][2] != bins_list_file2[0][2]:
bins_list_file1 = np.array(bins_list_file1)
bins_list_file2 = np.array(bins_list_file2)
bins_list_file1[:][2] *= -1
bins_list_file1 = np.absolute(np.array(bins_list_file1))
bins_list_file2 = np.absolute(np.array(bins_list_file2))
if bins_list_file1 is None and bins_list_file2 is None:
return True
nt.assert_array_almost_equal(bins_list_file1, bins_list_file2)
Expand Down

0 comments on commit 7f5a6dc

Please sign in to comment.