Skip to content

Commit

Permalink
fix: avoid removesuffix as it's only 3.9+
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Oct 2, 2023
1 parent b44fbed commit 3e7987e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hicstuff/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,15 +1458,15 @@ def check_fastq_entries(in_file):
stderr=sp.PIPE,
shell = True,
encoding = 'utf-8'
).stdout.removesuffix("\n").split(" ")[0]
).stdout[:-2].split(" ")[0]
else:
n_lines = sp.run(
"wc -l {f}".format(f = in_file),
stdout=sp.PIPE,
stderr=sp.PIPE,
shell = True,
encoding = 'utf-8'
).stdout.removesuffix("\n").split(" ")[0]
).stdout[:-2].split(" ")[0]

n_reads = int(n_lines)/4
return n_reads
Expand All @@ -1491,6 +1491,6 @@ def check_bam_entries(in_file):
stdout=sp.PIPE,
stderr=sp.PIPE,
encoding = 'utf-8'
).stdout.removesuffix("\n")
).stdout[:-2]

return int(n_reads)

0 comments on commit 3e7987e

Please sign in to comment.