Skip to content

Commit

Permalink
ruff and remove placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed May 28, 2024
1 parent df1662f commit 1fd03e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
4 changes: 3 additions & 1 deletion anglerfish/demux/adaptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def get_mask(self, insert_Ns: bool = True) -> str:
insert_Ns = True -> Returns the sequence with index and UMI tokens replaced with Ns of the correct length
insert_Ns = False -> Returns the sequence without index and UMI tokens
"""
index_length = len(self.index_seq) if self.index_seq is not None and insert_Ns else 0
index_length = (
len(self.index_seq) if self.index_seq is not None and insert_Ns else 0
)
umi_length = (
max(self.len_umi_after_index, self.len_umi_before_index) if insert_Ns else 0
)
Expand Down
16 changes: 0 additions & 16 deletions anglerfish/demux/kladd.py

This file was deleted.

4 changes: 3 additions & 1 deletion anglerfish/demux/samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def minimum_bc_distance(self) -> int:
testset[ont_barcode] = []
for adaptor in adaptors:
if adaptor.i5.has_index:
testset[ont_barcode].append(adaptor.i5.index_seq + adaptor.i7.index_seq)
testset[ont_barcode].append(
adaptor.i5.index_seq + adaptor.i7.index_seq
)
else:
testset[ont_barcode].append(adaptor.i7.index_seq)

Expand Down
13 changes: 3 additions & 10 deletions anglerfish/explore/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,8 @@ def run_explore(
):
if adaptor_end.has_index:
# Alignment thresholds
before_thres = round(
adaptor_end.len_before_index * good_hit_threshold
)
after_thres = round(
adaptor_end.len_after_index * good_hit_threshold
)
before_thres = round(adaptor_end.len_before_index * good_hit_threshold)
after_thres = round(adaptor_end.len_after_index * good_hit_threshold)
insert_thres_low = insert_thres_low
insert_thres_high = insert_thres_high

Expand Down Expand Up @@ -139,10 +135,7 @@ def run_explore(
)

thres = round(
(
adaptor_end.len_before_index
+ adaptor_end.len_after_index
)
(adaptor_end.len_before_index + adaptor_end.len_after_index)
* good_hit_threshold
)
df_good_hits = df_good_hits[df_good_hits["match_1_len"] >= thres]
Expand Down

0 comments on commit 1fd03e4

Please sign in to comment.