Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mnshgl0110 committed Oct 14, 2024
1 parent de82f9a commit 5b7ef64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand Down
14 changes: 7 additions & 7 deletions plotsr/scripts/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,13 @@ def _readbedgraph(self, chrlengths):
if len(line) < 4:
self.logger.warning("Incomplete information in bedgraph file at line: {}. Skipping it.".format("\t".join(line)))
continue
if curchr == line[0]:
if curchr == '':
curchr = line[0]
binv = np.zeros(ceil(chrlengths[0][1][curchr] / bw), dtype=int)
s = deque([int(line[1])])
e = deque([int(line[2])])
v = deque([int(val)])
elif curchr == line[0]:
s.append(int(line[1]))
e.append(int(line[2]))
v.append(val)
Expand All @@ -699,12 +705,6 @@ def _readbedgraph(self, chrlengths):
self.logger.warning("Chromosome in BEDGRAPH is not present in FASTA or not selected for plotting. Skipping it. BED line: {}".format("\t".join(line)))
skipchrs.append(line[0])
continue
elif curchr == '':
curchr = line[0]
binv = np.zeros(ceil(chrlengths[0][1][curchr]/bw), dtype=int)
s = deque([int(line[1])])
e = deque([int(line[2])])
v = deque([int(val)])
else:
if line[0] in added_chrs:
self.logger.error("BedGraph file: {} is not sorted. For plotting tracks, sorted BedGraph file is required. Exiting.".format(self.f))
Expand Down

0 comments on commit 5b7ef64

Please sign in to comment.