rotary-genomics / rotary

Assembly/annotation workflow for Nanopore-based microbial genome data containing circular DNA elements
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Add flag to keep read coverage mapping BAM files. #119

Closed LeeBergstrand closed 5 months ago

LeeBergstrand commented 5 months ago

I personally like keeping the BAM files for the final long and short read coverage calculations, because users can then check how reads mapped in specific places to look for abnormalities. However, from a high-throughput perspective, the BAM files waste a lot of space. What would you think about adding a setting in the config (e.g., keep_bam_files) that users can turn on so that the final BAM files are not treated as temp()? We could leave the setting False by default. This config setting could be used in a rule like this:

mapping="{sample}/annotation/coverage/{sample}_short_read.bam" if keep_bam_files else temp("{sample}/annotation/coverage/{sample}_short_read.bam")

This would apply to calculate_final_short_read_coverage and calculate_final_long_read_coverage.

_Originally posted by @jmtsuji in https://github.com/rotary-genomics/rotary/pull/114#discussion_r1482665387_

jmtsuji commented 5 months ago

Addressed in #125