-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.gitlab-ci.yml
116 lines (108 loc) · 5.68 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Include shared CI
include:
- project: "epi2melabs/ci-templates"
file: "wf-containers.yaml"
variables:
# Workflow inputs given to nextflow.
# The workflow should define `--out_dir`, the CI template sets this.
# Only common file inputs and option values need to be given here
# (not things such as -profile)
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case01"
NF_IGNORE_PROCESSES: "rebatchFastq"
CI_FLAVOUR: "new"
aws-run:
artifacts:
when: always
paths:
- ${CI_PROJECT_NAME}
- .nextflow.log
exclude: [] # give me everything pal
allow_failure: true
docker-run:
# Remove this directive in downstream templates
tags:
- large_ram
# Define a 1D job matrix to inject a variable named MATRIX_NAME into
# the CI environment, we can use the value of MATRIX_NAME to determine
# which options to apply as part of the rules block below
# NOTE There is a slightly cleaner way to define this matrix to include
# the variables, but it is broken when using long strings! See CW-756
parallel:
matrix:
- MATRIX_NAME: [
"kraken2", "minimap2", "batch", "kraken2-watch-path", "minimap2-sample-sheet",
"kraken2-baf", "minimap2-baf", "minimap2-filter", "kraken2-amr", "minimap2-amr",
"minimap2-exclude-host", "kraken2-exclude-host"
]
rules:
- if: ($CI_COMMIT_BRANCH == null || $CI_COMMIT_BRANCH == "dev-template")
when: never
- if: $MATRIX_NAME == "kraken2"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case01"
NF_IGNORE_PROCESSES: "rebatchFastq,stopCondition"
- if: $MATRIX_NAME == "batch"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case01 --batch_size 1000 --taxonomic_rank G --kraken_confidence 0.01"
NF_IGNORE_PROCESSES: "stopCondition"
# In wf-metagenomics, the wf runs indefinitely if there is no condition to stop it.
# With the read limit we can stop the wf if the limit is reached.
# It creates a STOP.fastq.gz that will be a new input in the wf and make it stop.
# Use the creation of this file to test if watch_path is able to detect new input files.
- if: $MATRIX_NAME == "kraken2-watch-path"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case01 --watch_path --read_limit 1000"
NF_IGNORE_PROCESSES: "rebatchFastq"
- if: $MATRIX_NAME == "minimap2"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case01 --classifier minimap2"
NF_IGNORE_PROCESSES: "extractMinimap2Reads"
- if: $MATRIX_NAME == "minimap2-sample-sheet"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case02 --classifier minimap2 --sample_sheet test_data/case02/sample_sheet.csv --taxonomic_rank G --n_taxa_barplot 10 --abundance_threshold 0.01"
NF_IGNORE_PROCESSES: "extractMinimap2Reads"
# Add test with data from Bacteria, Archaea, Fungi (BAF) with are supposed to be included in the default database: ncbi_16s_18s.
# It also works as a test for single file.
- if: $MATRIX_NAME == "kraken2-baf"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case03_baf/reads_baf.fastq.gz"
NF_IGNORE_PROCESSES: "rebatchFastq,stopCondition"
- if: $MATRIX_NAME == "minimap2-baf"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case03_baf/reads_baf.fastq.gz --classifier minimap2 --keep_bam"
NF_IGNORE_PROCESSES: "extractMinimap2Reads"
# Exclude Archaea and Eukaryota from extracted reads (remaining reads should be just from Bacteria).
- if: $MATRIX_NAME == "minimap2-filter"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case03_baf/reads_baf.fastq.gz --classifier minimap2 --minimap2filter '2157,2759' --minimap2exclude"
NF_IGNORE_PROCESSES: ""
# AMR tests using isolate test data (need to find better tests)
- if: $MATRIX_NAME == "kraken2-amr"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq s3://ont-exd-int-s3-euwst1-epi2me-labs/wf-bacterial-genomes/test_data/isolates_fastq/barcode08 --amr"
NF_IGNORE_PROCESSES: "rebatchFastq,stopCondition"
- if: $MATRIX_NAME == "minimap2-amr"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq s3://ont-exd-int-s3-euwst1-epi2me-labs/wf-bacterial-genomes/test_data/isolates_fastq/barcode08 --classifier minimap2 --amr"
NF_IGNORE_PROCESSES: "extractMinimap2Reads"
- if: $MATRIX_NAME == "minimap2-exclude-host"
variables:
NF_PROCESS_FILES: "subworkflows/minimap_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case04 --classifier minimap2 --exclude_host test_data/case04/host.fasta.gz"
NF_IGNORE_PROCESSES: "extractMinimap2Reads"
- if: $MATRIX_NAME == "kraken2-exclude-host"
variables:
NF_PROCESS_FILES: "subworkflows/kraken_pipeline.nf"
NF_WORKFLOW_OPTS: "--fastq test_data/case04 --exclude_host test_data/case04/host.fasta.gz"
NF_IGNORE_PROCESSES: "rebatchFastq,stopCondition"