From 1e52fa5604db6ca59f353dbf3c9c18d12cad665d Mon Sep 17 00:00:00 2001 From: Alex Kanitz <alexander.kanitz@unibas.ch> Date: Fri, 14 Feb 2020 17:47:54 +0100 Subject: [PATCH] repo follows recommended structure --- .gitlab-ci.yml | 2 +- snakemake/Snakefile => Snakefile | 4 ++-- {runs => config}/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE | 0 tests/test_create_dag_image/test.sh | 4 ++-- .../config.yaml | 0 .../input_files/chr1-10000-20000.fa | 0 .../input_files/chr1-10000-20000.gtf | 0 .../input_files/chr1-10000-20000.transcripts.fa | 0 .../input_files/synthetic.mate_1.fastq.gz | Bin .../input_files/synthetic.mate_2.fastq.gz | Bin .../samples.tsv | 0 .../test.sh | 4 ++-- tests/test_integration_workflow/test.local.sh | 2 +- tests/test_integration_workflow/test.slurm.sh | 2 +- tests/test_scripts_labkey_to_snakemake/test.sh | 4 ++-- .../rules}/paired_end.snakefile.smk | 0 .../rules}/single_end.snakefile.smk | 0 17 files changed, 11 insertions(+), 11 deletions(-) rename snakemake/Snakefile => Snakefile (97%) rename {runs => config}/PUT_YOUR_WORKFLOW_RUN_CONFIGS_HERE (100%) rename tests/{test_rule_graph => test_create_rule_graph}/config.yaml (100%) rename tests/{test_rule_graph => test_create_rule_graph}/input_files/chr1-10000-20000.fa (100%) rename tests/{test_rule_graph => test_create_rule_graph}/input_files/chr1-10000-20000.gtf (100%) rename tests/{test_rule_graph => test_create_rule_graph}/input_files/chr1-10000-20000.transcripts.fa (100%) rename tests/{test_rule_graph => test_create_rule_graph}/input_files/synthetic.mate_1.fastq.gz (100%) rename tests/{test_rule_graph => test_create_rule_graph}/input_files/synthetic.mate_2.fastq.gz (100%) rename tests/{test_rule_graph => test_create_rule_graph}/samples.tsv (100%) rename tests/{test_rule_graph => test_create_rule_graph}/test.sh (78%) rename {snakemake => workflow/rules}/paired_end.snakefile.smk (100%) rename {snakemake => workflow/rules}/single_end.snakefile.smk (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7934c08..931b300 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 ba4bb99..c311cd0 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 6043d63..c377a7e 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 d68df4f..b67a888 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 4a5da25..a87ff58 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 2f2c9e7..246a1e5 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 27846cc..a62b53b 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 -- GitLab