Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Addimator committed Aug 15, 2024
1 parent 4885355 commit c01b09e
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
results/**
resources/**
logs/**
config/samples.tsv
.snakemake
.snakemake/**
report.zip
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resources:
scatter_items: 100

# Path of the sample file
sample_path: "/projects/koesterlab/benchmark-methylation/data_analysis_jochen/compare_meth/config/sample.tsv"
sample_path: "config/sample.tsv"

# Name of base experiment
ref_sample: "BC01-ref-sorted"
Expand Down
73 changes: 49 additions & 24 deletions workflow/envs/varlociraptor.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,54 @@
name: varlociraptor
# name: varlociraptor
# channels:
# - conda-forge
# - bioconda
# - rmg
# - nodefaults
# dependencies:
# - alignoth=0.7.3
# # - bcftools=1.16
# # - bwa=0.7.17
# - bzip2=1.0.8
# - ca-certificates=2022.12.7
# - cmake=3.25.1
# - curl=7.87.0
# - expat=2.5.0
# - gcc=12.2.0
# - gsl=2.7
# # - htslib=1.16
# - make=4.3
# - mason=2.0.9
# - perl=5.32.1
# - pkg-config=0.29.2
# - rust=1.80.0
# # - samtools=1.16.1
# - xz=5.2.6
# # - zlib=1.2.13
# - zlib-ng=2.0.6
# - zstd=1.5.2
# - libclang=16.0.6
# - clangdev=16.0.6
# - libgcc-ng


channels:
- conda-forge
- bioconda
- nodefaults
dependencies:
- alignoth=0.7.3
- bcftools=1.16
- bwa=0.7.17
- bzip2=1.0.8
- ca-certificates=2022.12.7
- cmake=3.25.1
- curl=7.87.0
- expat=2.5.0
- gcc=12.2.0
- gsl=2.7
- htslib=1.16
- make=4.3
- mason=2.0.9
- perl=5.32.1
- pkg-config=0.29.2
- rust=1.70
- samtools=1.16.1
- xz=5.2.6
- zlib=1.2.13
- zlib-ng=2.0.6
- zstd=1.5.2
- libclang=16.0.6
- clangdev=16.0.6
- varlociraptor =8.4
- vega-lite-cli =5.16
- bcftools =1.19
- libclang
- rust
- pkg-config
- make
- cmake
- gsl
- libcblas
- openssl
- zlib
- bzip2
- xz
- clangdev
- blis
3 changes: 1 addition & 2 deletions workflow/rules/dmr_calling.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ rule filter_calls:
event="PRESENT",
shell:
"""
PIPELINE_PATH=$(pwd)
cd {params.varlo_path}
cargo run --release -- filter-calls control-fdr --mode local-smart $PIPELINE_PATH/{input} --events {params.event} --fdr 0.01 > $PIPELINE_PATH/{output}
cargo run --release -- filter-calls control-fdr --mode local-smart {input} --events {params.event} --fdr 0.01 > {output}
"""


Expand Down
15 changes: 6 additions & 9 deletions workflow/rules/methylation_calling.smk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ scattergather:
rule find_candidates:
input:
"resources/genome.fasta",
varlo_path="resources/ref/varlociraptor",
varlo_path="resources/tools/varlociraptor",
output:
"resources/candidates/candidates.bcf",
log:
Expand All @@ -15,9 +15,8 @@ rule find_candidates:
"../envs/varlociraptor.yaml"
shell:
"""
PIPELINE_PATH=$(pwd)
cd {input.varlo_path}
cargo run -- methylation-candidates $PIPELINE_PATH/{input} $PIPELINE_PATH/{output}
cargo run -- methylation-candidates {input} {output}
"""


Expand All @@ -36,7 +35,7 @@ rule split_candidates:

rule compute_meth_observations:
input:
varlo_path="resources/ref/varlociraptor",
varlo_path="resources/tools/varlociraptor",
genome="resources/genome.fasta",
genomeIndex="resources/genome.fasta.fai",
alignments="resources/alignments/{sample}.bam",
Expand All @@ -52,15 +51,14 @@ rule compute_meth_observations:
sequencer=lambda wildcards: samples[wildcards.sample][1],
shell:
"""
PIPELINE_PATH=$(pwd)
cd {input.varlo_path}
cargo run --release -- preprocess variants $PIPELINE_PATH{input.genome} --candidates $PIPELINE_PATH{input.candidates} --bam $PIPELINE_PATH{input.alignments} --read-type {params.sequencer} --max-depth 1000 > $PIPELINE_PATH{output}
cargo run --release -- preprocess variants {input.genome} --candidates {input.candidates} --bam {input.alignments} --read-type {params.sequencer} --max-depth 1000 > {output}
"""


rule call_methylation:
input:
varlo_path="resources/ref/varlociraptor",
varlo_path="resources/tools/varlociraptor",
preprocess_obs="results/{sample}/normal_{scatteritem}.bcf",
scenario="resources/scenario.yaml",
output:
Expand All @@ -71,9 +69,8 @@ rule call_methylation:
"../envs/varlociraptor.yaml"
shell:
"""
PIPELINE_PATH
cd {input.varlo_path}
cargo run --release -- call variants --omit-strand-bias generic --scenario $PIPELINE_PATH{input.scenario} --obs normal=$PIPELINE_PATH{input.preprocess_obs} > $PIPELINE_PATH{output}
cargo run --release -- call variants --omit-strand-bias generic --scenario {input.scenario} --obs normal={input.preprocess_obs} > {output}
"""


Expand Down
6 changes: 2 additions & 4 deletions workflow/rules/prepare_meth_calling.smk
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ rule genome_index:
"../envs/samtools.yaml"
shell:
"""
PIPELINE_PATH=$(pwd)
samtools faidx $PIPELINE_PATH{input}
samtools faidx {input}
"""


Expand All @@ -59,6 +58,5 @@ rule aligned_downsampled_index:
threads: 10
shell:
"""
PIPELINE_PATH=$(pwd)
samtools index -@ {threads} $PIPELINE_PATH{input}
samtools index -@ {threads} {input}
"""

0 comments on commit c01b09e

Please sign in to comment.