Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pangenome Guided Genome Assembly Workflow

Directory Structure

  • workflow/: Contains the main Snakefile and rule files in rules_Snakefile_parallel/
  • workflow/scripts/: Analysis and utility scripts used by the workflow
  • workflow/slurm_profile/: SLURM cluster configuration for parallel execution
  • config/: Contains snakemake configuration files for different datasets
  • benchmark/: Runtime and resource usage statistics for individual Snakemake rules
  • logs/: Standard output and error logs for each rule execution, useful for debugging
  • results*/: Output files generated by the pipeline.

Run the workflow

From the pga_workflow/ directory, run:

snakemake --use-singularity --singularity-args "-B /private/groups/" --configfile config/config_ontR10.yaml --cores 128 --printshellcmds

For SLURM cluster execution:

snakemake --profile workflow/slurm_profile --snakefile workflow/Snakefile --configfile config/config_ontR10.yaml --cores 128

To resume the workflow from where it left off (e.g., after interruption), use:

snakemake --use-singularity --singularity-args "-B /private/groups/" --configfile config/config_ontR10.yaml --cores 128 --printshellcmds --rerun-incomplete 
## Sometimes, it asks to unlock and then rerun
snakemake --use-singularity --singularity-args "-B /private/groups/" --configfile config/config_ontR10.yaml --cores 128 --printshellcmds --unlock

Configuration

The workflow is configured using the config/config_ontR10.yaml file. This file contains paths to input files, tool parameters, and other settings. The config file also contains details on the required format of the inputs.

Key Configuration Parameters

  • SAMPLE_IDS: A list of sample IDs to process.
  • graph_base: Path to the pangenome graph.
  • chm13_ref: Path to the CHM13 reference genome. (T2T-CHM13v2.0 currently being used)
  • HG002v101_ref: Path to the HG002 reference genome. (HG002v1.0.1 currently being used)
  • HG002v101_ref_index: Path to the HG002 reference index file.
  • MINIMAP: Parameters for minimap2.
  • HAPLOTYPE_SAMPLING: Parameters for haplotype sampling.
  • ANALYSEPAF, DISPLAYPAF, SHASTA: Paths to binaries.
  • VG_ANCHORS: Path to the vg anchors config file.
  • CHUNK_POINT_FINDING: Configuration for chunk point finding (bin path, target leaf snarls, TSV file).
  • TMPDIR: A temporary directory for intermediate files.
  • region: Defines the genomic region to be assembled (for regional mode).
  • region_id: Identifier for the assembly run (used for whole genome tests).

Workflow Behavior Flags

Additional flags in the config file allow for fine-grained control over the workflow's behavior:

  • RUN_MODE: Controls which workflow to run

    • "no_positive_control": Runs only the sample workflow
    • "positive_control_only": Runs only the positive control workflow. Uses the HG002-included graph for analysis
  • READ_TYPE: Controls which type of reads to use.

    • "raw": Use the original, raw sequencing reads.
    • "ec": Use error-corrected reads generated by a tool like hifiasm.
  • RUN_REGIONAL_MODE (boolean): If True, runs regional PGA workflow for a specific genomic region.

  • RUN_HIFIASM (boolean): If True, enables hifiasm assembly rules.

  • ASSEMBLE_CHUNKS (boolean): If True, assembles individual chunks in parallel.

  • ASSEMBLE_ENTIRE_CHROMOSOME (boolean): If True, assembles entire chromosomes.

  • STITCH_CHUNKS_PER_CHROMOSOME (boolean): If True, stitches chunk assemblies per chromosome.

  • USE_SHASTA2 (boolean): If True, uses Shasta2 instead of Shasta.

  • RUN_GBZ_QUERY (boolean): If True, the workflow will use gbz-base query to extract subgraph files (pg.vg, gfa, dist, gaf). If False, it will use vg chunk.

  • USE_FULL_GRAPH (boolean): If True, anchor generation will be performed using the full graph along with the reads and index from the gbz query. Note: This will overwrite the anchors/ directory.

  • RUN_DEBUGGING (boolean): If True, the workflow will generate extra output files useful for debugging, such as reliable snarl stats and files for visualization in Bandage.

About

Pangenome Guided Genome Assembly Workflow

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages