Open berntpopp opened 2 months ago
To implement three subcommands:
Subcommands:
case
block to parse and execute specific subcommands based on user input.Functions:
generate_exclusion_bed()
:
generate_inclusion_bed()
:
run_pipeline()
:
generate_exclusion_bed()
and generate_inclusion_bed()
.bcftools norm
.bcftools annotate
.bcftools filter
.Helper Functions:
normalize_bed()
: Applies sorting and annotation to a BED file.combine_and_process_bed()
: Merges, compresses, and indexes the BED files.normalize_and_annotate_vcf()
: Handles VCF normalization and annotation using bcftools
.Execution Flow:
generate-exclusion-bed
, only the exclusion BED files will be generated.generate-inclusion-bed
, only the inclusion BED files will be generated.run-pipeline
, all steps are executed sequentially, including VCF processing.Debugging and Logging:
debug_msg()
for detailed command logs when --debug
is enabled.Error Handling:
|| { log_msg "Error"; exit 1; }
after critical commands.Testing:
run-pipeline
to confirm the full workflow is executed correctly.
Description: Add subcommands for generating only exclusion or inclusion BED files without running the full pipeline. Possible subcommands:
generate-exclusion-bed
generate-inclusion-bed
run-pipeline