diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7934c08fa65dd94d820b881b90c5b6ccd1f655b6..931b3008e9d4253d25531c6bc8e382371807eacb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,6 @@ test: - bash tests/test_scripts_labkey_to_snakemake/test.sh # add integration tests here - bash tests/test_create_dag_image/test.sh - - bash tests/test_rule_graph/test.sh + - bash tests/test_create_rule_graph/test.sh - bash tests/test_integration_workflow/test.local.sh diff --git a/snakemake/Snakefile b/Snakefile similarity index 97% rename from snakemake/Snakefile rename to Snakefile index ba4bb99cb2794a827e5928bdadb37a6e658e0176..c311cd03115dd18c5d12ae8775946c469d323729 100644 --- a/snakemake/Snakefile +++ b/Snakefile @@ -18,8 +18,8 @@ localrules: finish # Execution dependend on sequencing mode ################################################################################## -include: 'paired_end.snakefile.smk' -include: 'single_end.snakefile.smk' +include: os.path.join('workflow', 'rules', 'paired_end.snakefile.smk') +include: os.path.join('workflow', 'rules', 'single_end.snakefile.smk') ################################################################################# ### Final rule diff --git a/runs/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE b/config/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE similarity index 100% rename from runs/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE rename to config/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE diff --git a/tests/test_create_dag_image/test.sh b/tests/test_create_dag_image/test.sh index 6043d639102004485ecc638ec8dc228bec341b94..c377a7e2eb21fb462fee0ef8c35d658b2634cd0c 100755 --- a/tests/test_create_dag_image/test.sh +++ b/tests/test_create_dag_image/test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Tear down test environment -trap 'cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status +trap 'rm -rf .snakemake && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status # Set up test environment set -eo pipefail # ensures that script exits at first command that exits with non-zero status @@ -13,7 +13,7 @@ cd $script_dir # Run tests snakemake \ - --snakefile="../../snakemake/Snakefile" \ + --snakefile="../../Snakefile" \ --configfile="config.yaml" \ --dag \ --printshellcmds \ diff --git a/tests/test_rule_graph/config.yaml b/tests/test_create_rule_graph/config.yaml similarity index 100% rename from tests/test_rule_graph/config.yaml rename to tests/test_create_rule_graph/config.yaml diff --git a/tests/test_rule_graph/input_files/chr1-10000-20000.fa b/tests/test_create_rule_graph/input_files/chr1-10000-20000.fa similarity index 100% rename from tests/test_rule_graph/input_files/chr1-10000-20000.fa rename to tests/test_create_rule_graph/input_files/chr1-10000-20000.fa diff --git a/tests/test_rule_graph/input_files/chr1-10000-20000.gtf b/tests/test_create_rule_graph/input_files/chr1-10000-20000.gtf similarity index 100% rename from tests/test_rule_graph/input_files/chr1-10000-20000.gtf rename to tests/test_create_rule_graph/input_files/chr1-10000-20000.gtf diff --git a/tests/test_rule_graph/input_files/chr1-10000-20000.transcripts.fa b/tests/test_create_rule_graph/input_files/chr1-10000-20000.transcripts.fa similarity index 100% rename from tests/test_rule_graph/input_files/chr1-10000-20000.transcripts.fa rename to tests/test_create_rule_graph/input_files/chr1-10000-20000.transcripts.fa diff --git a/tests/test_rule_graph/input_files/synthetic.mate_1.fastq.gz b/tests/test_create_rule_graph/input_files/synthetic.mate_1.fastq.gz similarity index 100% rename from tests/test_rule_graph/input_files/synthetic.mate_1.fastq.gz rename to tests/test_create_rule_graph/input_files/synthetic.mate_1.fastq.gz diff --git a/tests/test_rule_graph/input_files/synthetic.mate_2.fastq.gz b/tests/test_create_rule_graph/input_files/synthetic.mate_2.fastq.gz similarity index 100% rename from tests/test_rule_graph/input_files/synthetic.mate_2.fastq.gz rename to tests/test_create_rule_graph/input_files/synthetic.mate_2.fastq.gz diff --git a/tests/test_rule_graph/samples.tsv b/tests/test_create_rule_graph/samples.tsv similarity index 100% rename from tests/test_rule_graph/samples.tsv rename to tests/test_create_rule_graph/samples.tsv diff --git a/tests/test_rule_graph/test.sh b/tests/test_create_rule_graph/test.sh similarity index 78% rename from tests/test_rule_graph/test.sh rename to tests/test_create_rule_graph/test.sh index d68df4f15ed4d154ec3f7221a8d2925efd0e725e..b67a88800779c5d3d5670d948108562f41bf92e9 100755 --- a/tests/test_rule_graph/test.sh +++ b/tests/test_create_rule_graph/test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Tear down test environment -trap 'cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status +trap 'rm -rf .snakemake && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status # Set up test environment set -eo pipefail # ensures that script exits at first command that exits with non-zero status @@ -13,7 +13,7 @@ cd $script_dir # Run tests snakemake \ - --snakefile="../../snakemake/Snakefile" \ + --snakefile="../../Snakefile" \ --configfile="config.yaml" \ --rulegraph \ --printshellcmds \ diff --git a/tests/test_integration_workflow/test.local.sh b/tests/test_integration_workflow/test.local.sh index 4a5da25c6e6495f207afeeefe943906d7fdda134..a87ff5856245af3a831078e5c5cb6d9863e85d3f 100755 --- a/tests/test_integration_workflow/test.local.sh +++ b/tests/test_integration_workflow/test.local.sh @@ -14,7 +14,7 @@ mkdir -p logs/local_log # Run tests snakemake \ - --snakefile="../../snakemake/Snakefile" \ + --snakefile="../../Snakefile" \ --configfile="config.yaml" \ --cores=4 \ --printshellcmds \ diff --git a/tests/test_integration_workflow/test.slurm.sh b/tests/test_integration_workflow/test.slurm.sh index 2f2c9e76c307383f31bae337dc3b88b573c356d2..246a1e506e16cdf03615f7cbff2bc47964a63411 100755 --- a/tests/test_integration_workflow/test.slurm.sh +++ b/tests/test_integration_workflow/test.slurm.sh @@ -15,7 +15,7 @@ mkdir -p logs/local_log # Run tests snakemake \ - --snakefile="../../snakemake/Snakefile" \ + --snakefile="../../Snakefile" \ --configfile="config.yaml" \ --cluster-config="cluster.json" \ --cluster="sbatch --cpus-per-task={cluster.threads} --mem={cluster.mem} --qos={cluster.queue} --time={cluster.time} --job-name={cluster.name} -o {cluster.out} -p scicore" \ diff --git a/tests/test_scripts_labkey_to_snakemake/test.sh b/tests/test_scripts_labkey_to_snakemake/test.sh index 27846ccec8c49aacab4d006346a2247ec8a5eca3..a62b53bfa002400989f498a35bc48007a07d3788 100755 --- a/tests/test_scripts_labkey_to_snakemake/test.sh +++ b/tests/test_scripts_labkey_to_snakemake/test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Tear down test environment -trap 'rm config.yaml samples.tsv && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status +trap 'rm -rf config.yaml samples.tsv .snakemake && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status # # Set up test environment set -eo pipefail # ensures that script exits at first command that exits with non-zero status @@ -25,7 +25,7 @@ python "../../scripts/labkey_to_snakemake.py" \ snakemake \ - --snakefile="../../snakemake/Snakefile" \ + --snakefile="../../Snakefile" \ --configfile="config.yaml" \ --dryrun \ # --rulegraph \ diff --git a/snakemake/paired_end.snakefile.smk b/workflow/rules/paired_end.snakefile.smk similarity index 100% rename from snakemake/paired_end.snakefile.smk rename to workflow/rules/paired_end.snakefile.smk diff --git a/snakemake/single_end.snakefile.smk b/workflow/rules/single_end.snakefile.smk similarity index 100% rename from snakemake/single_end.snakefile.smk rename to workflow/rules/single_end.snakefile.smk