Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
genomewalker committed Nov 17, 2022
1 parent 1eee548 commit d8521ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bam_filter/sam_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ def get_bam_stats(
contig=reference, multiple_iterators=False, until_eof=False
):
ani_read = (1 - ((aln.get_tag("NM") / aln.infer_query_length()))) * 100
if aln.query_name == "M_A00706:52:HJYNKDSXX:1:1101:30246:1485":
print(ani_read)
exit()
if ani_read >= min_read_ani:
n_alns += 1
read_hits[aln.query_name] += 1
Expand Down Expand Up @@ -632,7 +629,7 @@ def process_bam(
references = [
chrom.contig
for chrom in samfile.get_index_statistics()
if chrom.mapped > min_read_count
if chrom.mapped >= min_read_count
]

if len(references) == 0:
Expand All @@ -647,7 +644,6 @@ def process_bam(
c_size = calc_chunksize(
n_workers=threads, len_iterable=len(references), factor=4
)
references = ["IMGVR_UViG_2710264778_000001"]
ref_chunks = [references[i : i + c_size] for i in range(0, len(references), c_size)]
params = zip([bam] * len(ref_chunks), ref_chunks)
try:
Expand Down

0 comments on commit d8521ca

Please sign in to comment.