Skip to content

Commit

Permalink
MInor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
genomewalker committed Oct 13, 2024
1 parent 1d34793 commit 0f53317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bam_filter/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def filter_references(args):
sort_by_name=args.sort_by_name,
min_read_ani=args.min_read_ani,
disable_sort=args.disable_sort,
write_bam=args.bam_filtered is not None,
)
else:
logging.info("Skipping filtering of reference BAM file.")
Expand Down
3 changes: 2 additions & 1 deletion bam_filter/sam_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ def filter_reference_BAM(
transform_cov_evenness=False,
sort_by_name=False,
disable_sort=False,
write_bam=False,
):
"""Filter BAM based on certain conditions
Expand Down Expand Up @@ -1162,7 +1163,7 @@ def filter_reference_BAM(
sep="\t",
index=False,
)
if out_files["bam_filtered"] is not None:
if write_bam:
logging.info("Writing filtered BAM file... (be patient)")
# refs_dict = dict(
# zip(df_filtered["reference"], df_filtered["bam_reference_length"])
Expand Down

0 comments on commit 0f53317

Please sign in to comment.