From e7f814ab395451d08693ab9ba993ab63c82d1887 Mon Sep 17 00:00:00 2001 From: Zilong-Li Date: Thu, 18 Jul 2024 15:30:32 +0200 Subject: [PATCH] update readme --- README.md | 8 +++++++ config/README.md | 7 +++++++ config/config.yaml | 4 ++-- workflow/envs/quilt.yaml | 9 ++++---- workflow/rules/common.smk | 44 ++++++++++++++++++--------------------- 5 files changed, 42 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 384db5e..3c0b5d6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ This workflow is for imputation using low coverage whole genome sequencing data - bcftools - [vcfppR](https://github.com/Zilong-Li/vcfppR) +## Quick start + +``` +git clone https://github.com/Zilong-Li/lcWGS-imputation-workflow +cd .test && ln -s ../workflow +snakemake -j10 -n +``` + ## Usage The usage of this workflow is described in the [Snakemake Workflow Catalog](https://snakemake.github.io/snakemake-workflow-catalog/?usage=Zilong-Li%2FlcWGS-imputation-workflow). diff --git a/config/README.md b/config/README.md index 69fb439..543ebbe 100644 --- a/config/README.md +++ b/config/README.md @@ -20,3 +20,10 @@ Modify the list of `refsize` in `config/config.yaml`. In default `refsize=[0]`, # Different scenario run Modify the variable `scenario` in `config/config.yaml` to decide what analyses to run. + +- `all` : run all comparisions across all programs and settings. requires `truth` to be configured. +- `speed`: run only speed comparisons across all programs and settings. +- `quilt1`: run only `QUILT`. +- `quilt2`: run only `QUILT2`, which is the default. +- `glimpse1`: run only `GLIMPSE`. +- `glimpse2`: run only `GLIMPSE2`. diff --git a/config/config.yaml b/config/config.yaml index d010679..329d637 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -14,8 +14,8 @@ refsize: [0] chroms: ['chr20'] -#'all', 'speed', 'accuracy', 'quilt','glimpse','quilt1', 'quilt2', 'glimpse1', 'glimpse2' -scenario: 'all' +#'all', 'speed', 'accuracy', 'quilt1', 'quilt2', 'glimpse1', 'glimpse2' +scenario: 'quilt2' # global programs time: "/usr/bin/time" diff --git a/workflow/envs/quilt.yaml b/workflow/envs/quilt.yaml index 391000b..6cf80ac 100644 --- a/workflow/envs/quilt.yaml +++ b/workflow/envs/quilt.yaml @@ -1,6 +1,7 @@ channels: - - bioconda - - conda-forge + - r dependencies: - - r-stitch =1.6.6 - - r-quilt =1.0.3 + - r=4.2.2 + - r-stitch=1.7.0 + - r-mspbwt=0.1.0 + - r-quilt=2.0.0 diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 36b0a4d..b9cbd5a 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -44,8 +44,16 @@ def get_all_results(): return get_refpanel_sites() elif RUN == "accuracy": return get_accuracy_panelsize_plots(), get_accuracy_depth_plots() - elif RUN == "F1": - return get_accuracy_f1_plots() + elif RUN == "speed": + return get_speed_all_plots() + elif RUN == "quilt1": + return get_quilt_regular_results() + elif RUN == "quilt2": + return get_quilt_mspbwt_results() + elif RUN == "glimpse1": + return get_glimpse_results() + elif RUN == "glimpse2": + return get_glimpse2_results() elif RUN == "V2": return ( get_quilt_mspbwt_accuracy(), @@ -53,34 +61,13 @@ def get_all_results(): get_glimpse2_accuracy(), get_speed_glimpse2_plots(), ) - elif RUN == "speed": - return get_speed_all_plots() - elif RUN == "test": - return get_quilt_accuracy() - elif RUN == "quilt": + elif RUN == "quilt_all": return ( get_quilt_regular_accuracy(), get_speed_quilt_regular_plots(), get_quilt_mspbwt_accuracy(), get_speed_quilt_mspbwt_plots(), ) - elif RUN == "fast": - return ( - get_quilt_regular_accuracy(), - get_speed_quilt_regular_plots(), - get_quilt_mspbwt_accuracy(), - get_speed_quilt_mspbwt_plots(), - get_glimpse2_accuracy(), - get_speed_glimpse2_plots(), - ) - elif RUN == "quilt1": - return get_quilt_regular_accuracy(), get_speed_quilt_regular_plots() - elif RUN == "quilt2": - return get_speed_quilt_mspbwt_plots() - elif RUN == "glimpse1": - return get_glimpse_accuracy(), get_speed_glimpse_plots() - elif RUN == "glimpse2": - return get_glimpse2_accuracy(), get_speed_glimpse2_plots() else: raise RuntimeError("this is an invalid scenario!") @@ -238,6 +225,15 @@ def get_glimpse_results(): ) +def get_glimpse2_results(): + return expand( + rules.glimpse2_ligate.output, + chrom=config["chroms"], + size=config["refsize"], + depth=config["downsample"], + ) + + def if_exclude_samples_in_refpanel(wildcards): if REFPANEL[wildcards.chrom].get("exclude_samples"): return REFPANEL[wildcards.chrom]["exclude_samples"]