Skip to content

Commit

Permalink
fix: pairtools sort works with version >= 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed May 13, 2024
1 parent 2f2145a commit 7323ccc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hicstuff/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import hicstuff.stats as hcs
import matplotlib
import pathlib
import pairtools
from packaging.version import Version
from hicstuff.version import __version__
import hicstuff.log as hcl
from hicstuff.log import logger
Expand Down Expand Up @@ -1157,6 +1159,8 @@ def _out_file(fname):
sort_args = "--output {out} --tmpdir {tmp_dir}".format(
out = sorted_pairsf, tmp_dir = tmp_dir
)
if (Version(pairtools.__version__) >= Version('1.1.0')):
sort_args = sort_args + " --c1 chr1 --c2 chr2 --p1 pos1 --p2 pos2"
sp.call(pairstools_cmd + sort_args.split(" ") + [pairsf], shell=False)
os.remove(pairsf)

Expand Down

0 comments on commit 7323ccc

Please sign in to comment.