Skip to content

Commit

Permalink
Merge pull request #82 from NBISweden/dev
Browse files Browse the repository at this point in the history
Updates for GenErode version 0.6.1
  • Loading branch information
verku authored Jun 19, 2024
2 parents 93cbafc + 144939a commit 59ac224
Show file tree
Hide file tree
Showing 32 changed files with 1,589 additions and 368 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gerp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
- name: gerp_dry
shell: bash -l {0}
run: |
snakemake -npr --configfile .test/config/config_gerp.yaml -j 4 --cores 1 --use-singularity
snakemake -np -k --configfile .test/config/config_gerp.yaml -j 4 --cores 1 --use-singularity
- name: gerp
shell: bash -l {0}
run: |
snakemake --configfile .test/config/config_gerp.yaml -j 4 --cores 1 --use-singularity
snakemake -k --configfile .test/config/config_gerp.yaml -j 4 --cores 1 --use-singularity
4 changes: 2 additions & 2 deletions .github/workflows/mitogenome_mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
- name: mitogenome_mapping_dry
shell: bash -l {0}
run: |
snakemake -npr --configfile .test/config/config_mitogenomes.yaml -j 4 --cores 1 --use-singularity
snakemake -np -k --configfile .test/config/config_mitogenomes.yaml -j 4 --cores 1 --use-singularity
- name: mitogenome_mapping
shell: bash -l {0}
run: |
snakemake --configfile .test/config/config_mitogenomes.yaml -j 4 --cores 1 --use-singularity
snakemake -k --configfile .test/config/config_mitogenomes.yaml -j 4 --cores 1 --use-singularity
4 changes: 2 additions & 2 deletions .github/workflows/mlRho_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ jobs:
- name: mlRho_options_dry
shell: bash -l {0}
run: |
snakemake -npr --configfile .test/config/config_mlRho_options.yaml -j 4 --cores 1 --use-singularity
snakemake -np -k --configfile .test/config/config_mlRho_options.yaml -j 4 --cores 1 --use-singularity
- name: mlRho_options
shell: bash -l {0}
run: |
snakemake --configfile .test/config/config_mlRho_options.yaml -j 4 --cores 1 --use-singularity
snakemake -k --configfile .test/config/config_mlRho_options.yaml -j 4 --cores 1 --use-singularity
4 changes: 2 additions & 2 deletions .github/workflows/pca_roh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
- name: pca_roh_dry
shell: bash -l {0}
run: |
snakemake -npr --configfile .test/config/config_pca_roh.yaml -j 4 --cores 1 --use-singularity
snakemake -np -k --configfile .test/config/config_pca_roh.yaml -j 4 --cores 1 --use-singularity
- name: pca_roh
shell: bash -l {0}
run: |
snakemake --configfile .test/config/config_pca_roh.yaml -j 4 --cores 1 --use-singularity
snakemake -k --configfile .test/config/config_pca_roh.yaml -j 4 --cores 1 --use-singularity
4 changes: 2 additions & 2 deletions .github/workflows/snpeff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
- name: snpeff_dry
shell: bash -l {0}
run: |
snakemake -npr --configfile .test/config/config_snpeff.yaml -j 4 --cores 1 --use-singularity
snakemake -np -k --configfile .test/config/config_snpeff.yaml -j 4 --cores 1 --use-singularity
- name: snpeff
shell: bash -l {0}
run: |
snakemake --configfile .test/config/config_snpeff.yaml -j 4 --cores 1 --use-singularity
snakemake -k --configfile .test/config/config_snpeff.yaml -j 4 --cores 1 --use-singularity
4 changes: 2 additions & 2 deletions .test/config/config_pca_roh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ zerocoverage: False
# to set a minimum depth threshold. For ultra low coverage samples, a
# minimum hard threshold of 3X is applied that overrides this parameter.
# A minimum depth of 6X should be aimed for.
minDP: 0.33
minDP: 0.1

# Maximum depth threshold calculation per sample.
# Will be applied to mlRho analysis and in VCF file filtering.
# Factor by which the average genome-wide depth should be multiplied
# to set a maximum depth threshold.
maxDP: 10
maxDP: 100
#####


Expand Down
71 changes: 71 additions & 0 deletions config/slurm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# GenErode execution on Dardel (PDC/KTH)

1) Load the following modules:

```
module load PDC UPPMAX bioinfo-tools conda singularity tmux
```

> Note that tmux is only available as a module on Dardel
but the equivalent tool screen is pre-installed and does
not need to be loaded.

2) After cloning the repository, change permissions for the
Snakefile:

```
chmod 755 Snakefile
```

3) Create the GenErode conda environment or update an earlier
version. The latest conda environment contains the Snakemake
executor plugin for slurm:

```
conda create -f environment.yaml -n generode
```

4) Copy the configuration file `config/slurm/profile/config_plugin_dardel.yaml`
to `slurm/config.yaml`. This file specifies compute resources
for each rule or group jobs to be run on Dardel. Any rule or
group job that is not listed under `set-threads` or `set-resources`
uses default resources specified under `default-resources`. If
any rule or group job fails due to too little memory or run
time, their compute resources can be updated in this file.

> Note that memory requirements are specified three times in
the configuration file: 1) under `set-threads` (used by Snakemake
to specify threads in rules), 2) under `set-resources` and therein
under `mem_mb`, specifying the memory in Megabytes (multiplying
the number of threads with the available memory per thread),
and 3) under `set-resources` and therein under `cpus-per-task`
(the same number as specified under `set-threads`, required for
correct memory assignment on Dardel).

5) Start GenErode the following:

- Open a tmux session (alternatively, you can use screen)

- Activate the GenErode conda environment (create or update
from `environment.yaml`), replacing the path to the location
of the conda environment:

```
export CONDA_ENVS_PATH=/cfs/klemming/home/.../
conda activate generode
```

- Start the dry run:

```
snakemake --profile slurm -n &> YYMMDD_dry.out
```

- Start the main run:

```
snakemake --profile slurm &> YYMMDD_main.out
```

> Useful flags for running the pipeline: `--ri` to re-run
incomplete jobs and `-k` to keep going in case a job fails.
Loading

0 comments on commit 59ac224

Please sign in to comment.