scholl-lab / plasmicheck

Detect and quantify plasmid DNA contamination in sequencing data
MIT License
0 stars 0 forks source link

feat: Implement a dry-run mode #32

Open berntpopp opened 3 months ago

berntpopp commented 3 months ago

Description: Add a dry-run mode to validate input parameters and configurations without executing the entire pipeline. This will help users verify their setup before running the full pipeline.

Tasks:

berntpopp commented 3 months ago

Implementation Plan for Issue: feat: Implement a dry-run mode

  1. Add Dry-Run Command-Line Option:

    • Introduce a --dry-run option in cli.py.
    • Update the argument parser to include the --dry-run flag, allowing users to activate the dry-run mode.
  2. Update Command Execution Logic:

    • Modify the execution logic in cli.py to check for the dry-run flag.
    • For each command (convert, index, align, compare, spliced, pipeline, report, summary_reports):
      • If dry-run is enabled, log the actions that would be performed without executing them.
      • Use logging.info to output the intended steps, such as file conversions, alignments, and report generations.
      • Ensure that no actual processing or file modification occurs during the dry run.
  3. Implement Dry-Run Mode in Scripts:

    • Adjust scripts such as convert_plasmidfile_to_fasta.py, create_indexes.py, align_reads.py, and others to handle dry-run mode.
    • Add conditional checks for dry-run mode before executing any operations.
    • Use logging to indicate the actions that would have been taken (e.g., file creation, index generation).
  4. Test the Dry-Run Implementation:

    • Run the pipeline and individual commands in dry-run mode to ensure they correctly simulate the process without executing it.
    • Validate that the output provides a clear understanding of what would happen if the command was run in normal mode.
    • Ensure no files are created, modified, or deleted during the dry run.
  5. Document the Dry-Run Mode:

    • Update the user documentation to explain the purpose of the dry-run mode and how to use it.
    • Provide examples of dry-run outputs, demonstrating how users can verify their setup before full execution.
    • Include details on interpreting dry-run logs to ensure all necessary steps are accounted for.