Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation of the config file #6

Closed
JihedC opened this issue Feb 4, 2021 · 6 comments
Closed

Preparation of the config file #6

JihedC opened this issue Feb 4, 2021 · 6 comments

Comments

@JihedC
Copy link

JihedC commented Feb 4, 2021

Hi @ftabaro ,

I have prepared a config.yaml file as suggested in your documentation.

#!/bin/sh

REFERENCE="/exports/humgen/jihed/rrbs_zbtb24/reference"

python scripts/make_config.py \
    --config-path /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/config.yaml \
    --wd /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1 \
    --genome-path /exports/humgen/jihed/rrbs_zbtb24/reference/mm10.reference.fa \
    --bismark-index-path /exports/humgen/jihed/rrbs_zbtb24/reference \
    --sample-sheet /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/sample_sheet.csv \
    --annotation-file /exports/humgen/jihed/rrbs_zbtb24/genes.gtf \
    --dmr-window-size 500 \
    --dmr-difference 15 \
    --dmr-qvalue 0.01 \
    --min-per-group 2 \
    --mate1-pattern _R1 \
    --mate2-pattern _R2 \
    --fastq-extension .fastq \
    --genome-version mm10 \
    --singularity-container /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/methylsnake_latest.sif \
    --tmp-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/temp \
    --log-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/log \
    --reads-folder /exports/humgen/jihed/rrbs_zbtb24/fastq \
    --trimmed-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/trimmed \
    --alignments-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/bismark \
    --reports-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/reports/ \
    --nucleotide-stats-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/stats \
    --methylkitdb-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/methylkit \
    --rdata-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/rds \
    --bed-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/dmr \
    --pictures-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/pictures \
    --tables-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/tables \
    --fastqc-folder /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/fastqc

I have obtained this, which seems to be similar to the example document:

alignments_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/bismark
annotation_file: /exports/humgen/jihed/rrbs_zbtb24/genes.gtf
bed_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/dmr
bismark_index_path: /exports/humgen/jihed/rrbs_zbtb24/reference
dmr_difference:
  - 15.0
dmr_qvalue:
  - 0.01
dmr_step_size: 500
dmr_window_size: 500
fastq_extension: .fastq
fastqc_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/fastqc
genome_path: /exports/humgen/jihed/rrbs_zbtb24/reference/mm10.reference.fa
genome_version: mm10
high_coverage_percentage: 99.9
log_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/log
low_coverage_count: 10
mate1_pattern: _R1
mate2_pattern: _R2
methylkitdb_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/methylkit
min_per_group: 2
nucleotide_stats_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/stats
pictures_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/pictures
rdata_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/rds
reads_folder: /exports/humgen/jihed/rrbs_zbtb24/fastq
reports_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/reports/
sample_sheet: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/sample_sheet.csv
samples:
  - WT1
  - WT2
  - KO1
  - KO2
singularity_container: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/methylsnake_latest.sif
tables_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/tables
tmp_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/temp
trimmed_folder: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/trimmed
wd: /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1

I tried a dry run with snakemake -np and got the following error message:

KeyError in line 3 of /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/Snakefile:
'singularity_container'
  File "/exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/Snakefile", line 3, in <module>

I don't understand the error here because I downloaded the container and added the path to the config file:
/exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/methylsnake_latest.sif

Do you have any idea what can be wrong here?

Thanks in advance,

Jihed

@ftabaro
Copy link
Owner

ftabaro commented Feb 4, 2021

If you are not using the provided wrapper script you will need to run Snakemake with --configfile because no default is provided inside the Snakefile.

In fact, my wrapper run_snakemake.sh should throw an error if not run as run_snakemake.sh path/to/config.yaml.

@JihedC
Copy link
Author

JihedC commented Feb 4, 2021

So I can't make a dry run ?

@ftabaro
Copy link
Owner

ftabaro commented Feb 4, 2021

You can make a dry run but you need to add the path to the config file:

snakemake -n -p --configfile path/to/config.yaml

@JihedC
Copy link
Author

JihedC commented Feb 4, 2021

Thanks! It worked :)
I have got this error message now.

WildcardError in line 221 of /exports/humgen/jihed/rrbs_zbtb24/MethylSnake/MethylSnake-1.1.1/Snakefile:
Wildcards in params cannot be determined from output files. Note that you have to use a function to deactivate automatic wildcard expansion in params strings, e.g., `lambda wildcards: '{test}'`. Also see https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules:
'diff'

Do I need to define a contrast in the config file?

ftabaro added a commit that referenced this issue Feb 4, 2021
@ftabaro
Copy link
Owner

ftabaro commented Feb 4, 2021

I pushed a fix, please, update your repositoty. Thanks for pointing out!

@JihedC
Copy link
Author

JihedC commented Feb 4, 2021

Thanks the pipeline is now running. Note that I used the release 1.1.1 on a slurm computer.
I changed the Snakefile directly to make it work.

Thanks a lot! I hope to not have to bother you again! I learned a lot about Snakemake just by reading your pipeline!

@JihedC JihedC closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants