Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8119497
remove examples - they are outdated
luisas Mar 20, 2025
9f3a7d3
Fix ungrouped schema for preprocessing
luisas Mar 20, 2025
e30e3fb
fix schema description to template
luisas Mar 20, 2025
5568a54
Add tuning trials option
luisas Mar 20, 2025
05e70e0
Add emitting versions to all stimulus modules
luisas Mar 20, 2025
2608b8d
Collect all the versions
luisas Mar 20, 2025
3d99c17
Validate and parse tune trials range
luisas Mar 20, 2025
becb5ff
Add custom module to update stimulus config to test different number …
luisas Mar 20, 2025
0628135
add replicates for tuning
luisas Mar 20, 2025
785dcc1
fix publish dir directives
luisas Mar 20, 2025
8cbc55e
fix prefix for tune
luisas Mar 20, 2025
8fd062f
fix lint
luisas Mar 21, 2025
dc7e61f
Add ci test for tune eval
luisas Mar 21, 2025
5ecd7a0
fix lint
luisas Mar 21, 2025
8ae79ef
fix lint
luisas Mar 21, 2025
20df67e
fix lint
luisas Mar 21, 2025
a1e0fc9
Fix eval test
luisas Mar 21, 2025
a084f6f
add dev.config for stimulus development stage related params
suzannejin Mar 24, 2025
c2b1508
Add first version of predict module
luisas Mar 25, 2025
0c3deee
update schema for predict csv data
luisas Mar 25, 2025
2c144e3
add first draft of evaluation subworkflow
luisas Mar 25, 2025
15daf8f
add first draft evaluation subworkflow
luisas Mar 25, 2025
c284360
update predict module
luisas Mar 25, 2025
f93e8d7
fix bug with params.container_dev
suzannejin Mar 25, 2025
ab3f607
add test_ibis conf
suzannejin Mar 25, 2025
bbf290f
modify tune to store optuna artifacts
suzannejin Mar 25, 2025
e89f920
add test_ibis to ci
suzannejin Mar 25, 2025
59c8fed
use downsampled data for test_ibis
suzannejin Mar 25, 2025
5979d62
lint
suzannejin Mar 26, 2025
f666c03
update split_csv subworkflow to run split csv on each data
suzannejin Mar 26, 2025
0f2cde3
improve naming from ch_sub_config to ch_config_split
suzannejin Mar 26, 2025
2e013a2
properly combine data and config in transform_csv subworkflow
suzannejin Mar 26, 2025
be7ae8d
update test_ibis_with_preprocessing.config
suzannejin Mar 26, 2025
ad90efa
Merge branch 'dev' into dev-config
bjlang Mar 26, 2025
7bc8b49
combine channels properly for tune subworkflow
suzannejin Mar 26, 2025
feac397
Merge branch 'dev-config' of https://github.com/nf-core/deepmodelopti…
suzannejin Mar 26, 2025
24ecc08
allow params.genome to use local files
Mar 26, 2025
04f4c94
fix error with ch_genome
Mar 26, 2025
4dab01f
prediction module and subworkflows functional
luisas Mar 26, 2025
74c2fdd
add compare tensors module
luisas Mar 26, 2025
23b0979
solve issue with not caching CHECK_MODEL
suzannejin Mar 26, 2025
b4edb5c
remove the empty element from check model out
suzannejin Mar 26, 2025
388a680
fix bug in tuning input channel parsing
suzannejin Mar 26, 2025
64553a1
add comment
suzannejin Mar 26, 2025
e9b0324
update test_ibis.config
suzannejin Mar 26, 2025
d7bc654
properly save all results from tune module
suzannejin Mar 26, 2025
d3e2b6c
logic for predictions comparison
luisas Mar 26, 2025
df06bf1
add concat logic for cosine score
luisas Mar 26, 2025
706541d
fix merging conflicts
luisas Mar 26, 2025
66c6fbf
fix linting
suzannejin Mar 26, 2025
25fe7ba
[automated] Fix code linting
nf-core-bot Mar 26, 2025
4a475ba
fix small bug
suzannejin Mar 26, 2025
538982f
Merge branch 'dev-config' of https://github.com/nf-core/deepmodelopti…
suzannejin Mar 26, 2025
3fba9bf
add concat csv for cosine similarity
luisas Mar 26, 2025
0a4f34b
update
luisas Mar 26, 2025
16f1add
combination in one final csv
luisas Mar 27, 2025
15dfb0e
clean
luisas Mar 27, 2025
f6033a0
reduce trials for test config
luisas Mar 27, 2025
1e9d8e1
Update ci.ym
suzannejin Mar 27, 2025
f520da2
merge and resolve conflict
suzannejin Mar 27, 2025
3a32edd
fix bug
suzannejin Mar 27, 2025
7fd5ffd
add n_trial to meta
suzannejin Mar 27, 2025
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- "singularity"
test_name:
- "test"
- "test_ibis"
- "test_ibis_with_preprocessing"
Copy link
Contributor

Choose a reason for hiding this comment

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

The test data is a small subset of ibis right? or is it the full dataset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it only has one TF
anyway the heavy part which is the tuning - i set max_sample to be very small, so it basically just runs for a bit and stops - to be fast

- "test_noise_eval"
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
Expand Down
7 changes: 7 additions & 0 deletions conf/dev.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
params {
config_profile_name = 'Development profile'
config_profile_description = 'Params needed during development'

// container
container_dev = "docker.io/mathysgrapotte/stimulus-py:dev"
}
69 changes: 59 additions & 10 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ process {
publishDir = [
path: {"${params.outdir}/data"},
mode: params.publish_dir_mode,
pattern: "*.csv"
pattern: "*.csv",
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.prefix = { "${meta.id}.stimulus" }
ext.suffix = { "csv" }
Expand All @@ -89,43 +90,91 @@ process {
// main config
// ==============================================================================

withName: "STIMULUS_SPLIT_SPLIT" {
withName: "STIMULUS_SPLIT_TRANSFORM" {
publishDir = [
path: { "${params.outdir}/configs" },
mode: params.publish_dir_mode
path: { "${params.outdir}/configs/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
tag = { "${meta.id}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "STIMULUS_SPLIT_DATA" {
publishDir = [
enabled: false
]
ext.prefix = { "${meta.id}-split-${meta2.split_id}" }
ext.prefix = { "${meta.id}-split-${meta.split_id}" }
tag = { "${meta.id} - split: ${meta.split_id}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "STIMULUS_TRANSFORM_CSV" {
publishDir = [
path: { "${params.outdir}/data" },
path: { "${params.outdir}/transformed_data/${meta.id}" },
mode: params.publish_dir_mode,
when: params.save_data
when: params.save_data,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.prefix = { "${meta.id}-split-${meta2.split_id}-trans-${meta2.transform_id}" }
ext.prefix = { "${meta.id}-split-${meta.split_id}-trans-${meta.transform_id}" }
tag = { "${meta.id} - split: ${meta.split_id} - transform: ${meta.transform_id}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "CHECK_MODEL" {
ext.args = { [
params.check_model_num_samples ? "-n ${params.check_model_num_samples}" : '',
params.debug_mode ? "--debug_mode" : ''
].flatten().unique(false).join(' ').trim()}
tag = { "${meta.id} - split: ${meta.split_id} - transform: ${meta.transform_id}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "STIMULUS_TUNE" {
ext.args = { [
params.debug_mode ? "--debug_mode" : ''
].flatten().unique(false).join(' ').trim()}
publishDir = [
path: { "${params.outdir}/tune_results/${meta.id}" },
mode: params.publish_dir_mode
path: { "${params.outdir}/tune_results/${meta.id}/${meta.split_id}/${meta.transform_id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.prefix = { "${meta.id}-split-${meta.split_id}-trans-${meta.transform_id}-rep-${meta.replicate}" }
tag = { "${meta.id} - split: ${meta.split_id} - transform: ${meta.transform_id} - replicate: ${meta.replicate}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "STIMULUS_PREDICT" {
ext.prefix = { "${meta.id}-split-${meta.split_id}-transf-${meta.transform_id}-rep-${meta.replicate}" }
tag = { "${meta.id} - split: ${meta.split_id} - transform: ${meta.transform_id} - replicate: ${meta.replicate}" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "STIMULUS_COMPARE_TENSORS_COSINE" {
ext.args = { "--mode cosine_similarity" }
if (params.container_dev) {
container = params.container_dev
}
}

withName: "CONCAT_COSINE" {
ext.prefix = { "summary_cosine" }
publishDir = [
path: { "${params.outdir}/evaluation_results/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
Expand Down
47 changes: 47 additions & 0 deletions conf/test_ibis.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run main.nf -profile test_ibis,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test ibis profile'
config_profile_description = 'Minimal ibis test dataset to check pipeline functions'

// Input data
data = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ibis_SP140/SP140_shade.stimulus.csv'
data_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/data.yaml'
model = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ConvBasic_withEfficientKAN.py'
model_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ConvBasic_withEfficientKAN.yaml'

// output
save_data = true
}

// Limit resources so that this can run on GitHub Actions
process {
maxRetries = params.max_retries
errorStrategy = params.err_start

withLabel:process_low {
cpus = { 1 }
memory = { 4.GB * task.attempt }
time = { 10.m * task.attempt }
}
withLabel:process_medium {
cpus = { 2 }
memory = { 6.GB * task.attempt }
time = { 30.m * task.attempt }
}
withLabel:process_high {
cpus = { 4 }
memory = { 8.GB * task.attempt }
time = { 1.h * task.attempt }
}
}
50 changes: 50 additions & 0 deletions conf/test_ibis_with_preprocessing.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run main.nf -profile test_ibis,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test ibis profile - with preprocessing'
config_profile_description = 'Minimal ibis test dataset (with preprocessing) to check pipeline functions'

// Input data
data = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ibis_SP140/SP140_ghts.peaks'
data_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/data.yaml'
model = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ConvBasic_withEfficientKAN.py'
model_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ConvBasic_withEfficientKAN.yaml'
preprocessing_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/ibis/ibis_SP140/preprocessing.yaml'
genome = 'GRCh38'
bed_peak_size = 40

// output
save_data = true
}

// Limit resources so that this can run on GitHub Actions
process {
maxRetries = params.max_retries
errorStrategy = params.err_start

withLabel:process_low {
cpus = { 1 }
memory = { 4.GB * task.attempt }
time = { 10.m * task.attempt }
}
withLabel:process_medium {
cpus = { 2 }
memory = { 6.GB * task.attempt }
time = { 30.m * task.attempt }
}
withLabel:process_high {
cpus = { 4 }
memory = { 8.GB * task.attempt }
time = { 1.h * task.attempt }
}
}
54 changes: 54 additions & 0 deletions conf/test_noise_eval.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nf-core/rnaseq -profile test,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline functions'

// Input data
data = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/titanic/titanic_stimulus.csv'
data_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/titanic/titanic.yaml'
model = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/titanic/titanic_model.py'
model_config = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/titanic/titanic_model.yaml'

// tune parameters
tune_trials_range = "2,4,2"
tune_replicates = 2

// predict data
prediction_data = params.pipelines_testdata_base_path + 'deepmodeloptim/testdata/titanic/titanic_stimulus.csv'

// output
save_data = false
}

// Limit resources so that this can run on GitHub Actions
process {
maxRetries = params.max_retries
errorStrategy = params.err_start

withLabel:process_low {
cpus = { 1 }
memory = { 4.GB * task.attempt }
time = { 10.m * task.attempt }
}
withLabel:process_medium {
cpus = { 2 }
memory = { 6.GB * task.attempt }
time = { 30.m * task.attempt }
}
withLabel:process_high {
cpus = { 4 }
memory = { 8.GB * task.attempt }
time = { 1.h * task.attempt }
}
}
28 changes: 0 additions & 28 deletions examples/pipeline_generated.json

This file was deleted.

19 changes: 0 additions & 19 deletions examples/test.json

This file was deleted.

Loading