Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 41 additions & 31 deletions config/sbatch.yml
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mostly reformated this file

Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
---
__default__:
time: "0-00:20"
threads: 1
mem: 2G
queue: debug
error: "logs/%x_%j_%N.err"
output: "logs/%x_%j_%N.log"
time: "0-00:20:00"
threads: 1
mem: 2G
queue: debug
error: "logs/%x_%j_%N.err"
output: "logs/%x_%j_%N.log"
regression_input_get_training:
time: "0-02:00"
threads: 1
mem: 5G
queue: short
regression_input_get_test:
time: "0-02:00"
threads: 1
mem: 5G
queue: short
sequence_selection_negative_background_widnows:
time: "0-01:00"
threads: 1
mem: 10G
time: "0-01:00:00"
threads: 1
mem: 10G
sequence_selection_negative_background_input:
time: "0-01:00"
threads: 1
mem: 10G
time: "0-01:00"
threads: 1
mem: 10G
sequence_selection_negative_background_sampler:
time: "0-01:00"
threads: 1
mem: 20G
time: "0-01:00"
threads: 1
mem: 20G
training_multitask:
time: "5-00:00"
mem: 30G
threads: 25
queue: gpu --gres=gpu:tesla:4
time: "5-00:00"
mem: 30G
threads: 25
queue: gpu --gres=gpu:tesla:2
predict_fromFasta:
time: "0-02:00"
mem: 30G
threads: 1
queue: gpu --gres=gpu:tesla:1
time: "0-02:00"
mem: 30G
threads: 1
queue: gpu --gres=gpu:tesla:1
training_regression:
time: "0-08:00"
mem: 30G
threads: 25
queue: gpu --gres=gpu:tesla:4
mem: 10G
threads: 1
queue: gpu --gres=gpu:tesla:1
predict_regression:
time: "0-02:00"
mem: 30G
threads: 1
queue: gpu --gres=gpu:tesla:1
model_interpretation_runBackgroundSampler:
time: "0-10:00"
threads: 4
mem: 80G
queue: medium
time: "0-10:00"
threads: 4
mem: 80G
queue: medium
model_interpretation_deepexplain:
time: "1-00:00"
mem: 30G
Expand Down Expand Up @@ -72,4 +82,4 @@ plot_satmut_predict_region:
time: "0-00:10"
mem: 10G
threads: 1
queue: gpu --gres=gpu:tesla:1
queue: gpu --gres=gpu:tesla:1
1 change: 0 additions & 1 deletion workflow/envs/deepexplain_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
channels:
- conda-forge
- bioconda
- defaults
channel_priority: true
dependencies:
- python
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/deeplift_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- click
- kipoi
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bc
- click
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/legnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: legnet
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_kmp_llvm
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/negative_training_sampler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- negative_training_sampler
1 change: 0 additions & 1 deletion workflow/envs/plot_ism_regions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- click
- h5py
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/plot_satmut.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- r-tidyverse
- r-optparse
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/plot_satmut_regions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- click
- h5py
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/samtools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- samtools
- bedtools
Expand Down
23 changes: 13 additions & 10 deletions workflow/envs/tensorflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
channels:
- conda-forge
- bioconda
- defaults
- anaconda
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cannot use the anaconda channel

dependencies:
- click
- kipoi
- kipoi-utils
- kipoiseq
- numpy
- pandas
- python
- click==8.1.8
- kipoi==0.8.6
- kipoi-utils==0.7.7
- kipoiseq==0.7.1
- numpy==1.23.4
- pandas==1.3.5
- python==3.9
- pybedtools
- tensorflow
- tensorflow-gpu
- tensorflow==2.6.2
- tensorflow-gpu <2.14
- cudatoolkit
- cudnn
- nccl
1 change: 0 additions & 1 deletion workflow/envs/tfmodisco-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- click
- h5py
Expand Down
1 change: 0 additions & 1 deletion workflow/envs/tfmodisco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- click
- h5py
Expand Down
13 changes: 6 additions & 7 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
################################
#### Global functions ####
################################
from snakemake.workflow import srcdir

SCRIPTS_DIR = srcdir("../scripts")
RESOURCES_DIR = srcdir("../../resources")

import os
RESOURCES_DIR = os.path.abspath("../../resources")
SCRIPTS_DIR = "../scripts"

def getScript(name):
return "%s/%s" % (SCRIPTS_DIR, name)
return os.path.join(os.path.dirname(workflow.main_snakefile), 'scripts', name)


from snakemake.utils import validate
Expand Down Expand Up @@ -56,7 +54,8 @@ def getWrapperPath(file):
"""
Get directory for snakemake wrappers.
"""
return "%s/%s" % (config["wrapper_directory"], file)
abs_path = os.path.abspath(os.path.join(config["wrapper_directory"], file))
return abs_path


def isPretrained():
Expand Down
82 changes: 41 additions & 41 deletions workflow/rules/model_interpretation.smk
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you commented out both rules?

Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ rule model_interpretation_ism:
## tf-modisco-ism
rule model_interpretation_ism_concat:
conda:
"../envs/tfmodisco.yml"
"../envs/tfmodisco-lite.yml"
input:
scores=lambda wc: expand(
"results/model_interpretation/ism/scores.{{test_fold}}.{validation_fold}.h5",
Expand All @@ -237,26 +237,26 @@ rule model_interpretation_ism_concat:
"""


rule model_interpretation_tfmodisco_ism:
conda:
"../envs/tfmodisco.yml"
input:
scores=expand(
"results/model_interpretation/ism/scores_concat.{test_fold}.h5",
test_fold=list(range(1, 11)),
),
script=getScript("tfmodisco_single_task.py"),
output:
hdf5="results/model_interpretation/ism/tfmodisco/tfmodisco.hdf5",
log:
"logs/model_interpretation/tfmodisco_ism.log",
shell:
"""
scores=`for i in {input.scores}; do echo "--scores $i"; done`;
python {input.script} \
`echo $scores` \
--output {output.hdf5} &> {log}
"""
# rule model_interpretation_tfmodisco_ism:
# conda:
# "../envs/tfmodisco.yml"
# input:
# scores=expand(
# "results/model_interpretation/ism/scores_concat.{test_fold}.h5",
# test_fold=list(range(1, 11)),
# ),
# script=getScript("tfmodisco_single_task.py"),
# output:
# hdf5="results/model_interpretation/ism/tfmodisco/tfmodisco.hdf5",
# log:
# "logs/model_interpretation/tfmodisco_ism.log",
# shell:
# """
# scores=`for i in {input.scores}; do echo "--scores $i"; done`;
# python {input.script} \
# `echo $scores` \
# --output {output.hdf5} &> {log}
# """


rule model_interpretation_tfmodisco_lite_ism:
Expand Down Expand Up @@ -306,26 +306,26 @@ rule model_interpretation_tfmodisco_lite_report_ism:
## tf-modisco1


rule model_interpretation_tfmodisco1:
conda:
"../envs/tfmodisco.yml"
input:
scores="results/model_interpretation/ism/scores.{test_fold}.{validation_fold}.h5",
script=getScript("tf_modisco.py"),
output:
hdf5="results/model_interpretation/ism/tfmodisco/tfModisco.{test_fold}.{validation_fold}.hdf5",
fig_dir=directory(
"results/model_interpretation/ism/tfmodisco/figures.{test_fold}.{validation_fold}/"
),
log:
"logs/model_interpretation/tfmodisco1.{test_fold}.{validation_fold}.log",
shell:
"""
python {input.script} \
--input {input.scores} \
--output {output.hdf5} \
--output-figures-dir {output.fig_dir} &> {log}
"""
# rule model_interpretation_tfmodisco1:
# conda:
# "../envs/tfmodisco.yml"
# input:
# scores="results/model_interpretation/ism/scores.{test_fold}.{validation_fold}.h5",
# script=getScript("tf_modisco.py"),
# output:
# hdf5="results/model_interpretation/ism/tfmodisco/tfModisco.{test_fold}.{validation_fold}.hdf5",
# fig_dir=directory(
# "results/model_interpretation/ism/tfmodisco/figures.{test_fold}.{validation_fold}/"
# ),
# log:
# "logs/model_interpretation/tfmodisco1.{test_fold}.{validation_fold}.log",
# shell:
# """
# python {input.script} \
# --input {input.scores} \
# --output {output.hdf5} \
# --output-figures-dir {output.fig_dir} &> {log}
# """


rule model_interpretation_tfmodisco2:
Expand Down
6 changes: 3 additions & 3 deletions workflow/rules/plot_ism.smk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wildcard_constraints:
region="[^/.]+",
sequence_length="\d+",
target="\d+",
region=r"[^/.]+",
sequence_length=r"\d+",
target=r"\d+",


rule plot_ism_get_region:
Expand Down
1 change: 0 additions & 1 deletion workflow/rules/training.smk
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ else:
else "",
conda:
"../envs/tensorflow.yml"
threads: 25
shell:
"""
python {input.script} \
Expand Down
Loading