Skip to content

Commit

Permalink
feat: ngs_mapping cleanup, versions bump (#278) (#280)
Browse files Browse the repository at this point in the history
Refurbishing the ngs_maping step. Includes version bumps, more
consistent creation of log files. Removed picard hybrid capture
statistics and ngmlr steps.
  • Loading branch information
holtgrewe authored Dec 20, 2022
1 parent 174c413 commit af8e21f
Show file tree
Hide file tree
Showing 20 changed files with 369 additions and 704 deletions.
52 changes: 6 additions & 46 deletions snappy_pipeline/workflows/ngs_mapping/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ rule ngs_mapping_bwa_run:
log:
**wf.get_log_file("bwa", "run"),
wrapper:
wf.wrapper_path("bwa") # TODO => bwa/run
wf.wrapper_path("bwa")


# Run STAR --------------------------------------------------------------------
Expand All @@ -138,7 +138,7 @@ rule ngs_mapping_star_run:
log:
**wf.get_log_file("star", "run"),
wrapper:
wf.wrapper_path("star") # TODO => star/run
wf.wrapper_path("star")


# GATK-based BAM postprocessing -----------------------------------------------
Expand All @@ -158,7 +158,7 @@ if wf.config["postprocessing"] == "gatk_post_bam":
log:
**wf.get_log_file("gatk_post_bam", "run"),
wrapper:
wf.wrapper_path("gatk_post_bam") # TODO => gatk_post_bam/run
wf.wrapper_path("gatk_post_bam")


# Run minimap2 ---------------------------------------------------------------
Expand All @@ -180,48 +180,8 @@ rule ngs_mapping_minimap2_run:
wf.wrapper_path("minimap2")


# Run NGMLR -------------------------------------------------------------------


rule ngs_mapping_ngmlr_run:
input:
wf.get_input_files("ngmlr", "run"),
output:
**wf.get_output_files("ngmlr", "run"),
threads: wf.get_resource("ngmlr", "run", "threads")
resources:
time=wf.get_resource("ngmlr", "run", "time"),
memory=wf.get_resource("ngmlr", "run", "memory"),
partition=wf.get_resource("ngmlr", "run", "partition"),
params:
chained=False,
log:
**wf.get_log_file("ngmlr", "run"),
wrapper:
wf.wrapper_path("ngmlr/run")


# QC / Statistics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Generate Picard Hybrid Selection Metrics Report -----------------------------


rule ngs_mapping_picard_hs_metrics_run:
input:
**wf.get_input_files("picard_hs_metrics", "run"),
output:
**wf.get_output_files("picard_hs_metrics", "run"),
threads: wf.get_resource("picard_hs_metrics", "run", "threads")
resources:
time=wf.get_resource("picard_hs_metrics", "run", "time"),
memory=wf.get_resource("picard_hs_metrics", "run", "memory"),
partition=wf.get_resource("picard_hs_metrics", "run", "partition"),
log:
wf.get_log_file("picard_hs_metrics", "run"),
wrapper:
wf.wrapper_path("picard/hs_metrics")


# Generate target region coverage report --------------------------------------


Expand All @@ -238,7 +198,7 @@ rule ngs_mapping_target_coverage_report_run:
params:
**{"args": wf.get_params("target_coverage_report", "run")},
log:
wf.get_log_file("target_coverage_report", "run"),
**wf.get_log_file("target_coverage_report", "run"),
wrapper:
wf.wrapper_path("target_cov_report/run")

Expand Down Expand Up @@ -284,7 +244,7 @@ rule ngs_mapping_genome_coverage_report_run:
# Compute depth of coverage files (VCF and bigWig) ----------------------------


rule ngs_mapping_generate_doc_files:
rule ngs_mapping_bam_collect_doc_run:
input:
**wf.get_input_files("bam_collect_doc", "run")(),
output:
Expand All @@ -295,6 +255,6 @@ rule ngs_mapping_generate_doc_files:
memory=wf.get_resource("bam_collect_doc", "run", "memory"),
partition=wf.get_resource("bam_collect_doc", "run", "partition"),
log:
wf.get_log_file("bam_collect_doc", "run"),
**wf.get_log_file("bam_collect_doc", "run"),
wrapper:
wf.wrapper_path("maelstrom/bam_collect_doc")
Loading

0 comments on commit af8e21f

Please sign in to comment.