Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Jul 18, 2024
1 parent 354e1db commit e7f814a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 30 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
7 changes: 7 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
4 changes: 2 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions workflow/envs/quilt.yaml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 20 additions & 24 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -44,43 +44,30 @@ 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(),
get_speed_quilt_mspbwt_plots(),
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!")

Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit e7f814a

Please sign in to comment.