Skip to content

Commit 3e7987e

Browse files
committed
fix: avoid removesuffix as it's only 3.9+
1 parent b44fbed commit 3e7987e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hicstuff/io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,15 +1458,15 @@ def check_fastq_entries(in_file):
14581458
stderr=sp.PIPE,
14591459
shell = True,
14601460
encoding = 'utf-8'
1461-
).stdout.removesuffix("\n").split(" ")[0]
1461+
).stdout[:-2].split(" ")[0]
14621462
else:
14631463
n_lines = sp.run(
14641464
"wc -l {f}".format(f = in_file),
14651465
stdout=sp.PIPE,
14661466
stderr=sp.PIPE,
14671467
shell = True,
14681468
encoding = 'utf-8'
1469-
).stdout.removesuffix("\n").split(" ")[0]
1469+
).stdout[:-2].split(" ")[0]
14701470

14711471
n_reads = int(n_lines)/4
14721472
return n_reads
@@ -1491,6 +1491,6 @@ def check_bam_entries(in_file):
14911491
stdout=sp.PIPE,
14921492
stderr=sp.PIPE,
14931493
encoding = 'utf-8'
1494-
).stdout.removesuffix("\n")
1494+
).stdout[:-2]
14951495

14961496
return int(n_reads)

0 commit comments

Comments
 (0)