add nextflow d30e48d

This commit is contained in:
2026-04-29 23:01:54 +02:00
parent d0b12d668d
commit 97cc9058d3
2840 changed files with 730250 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# TEST TO BE IGNORED
plugin-registry.nf

View File

@@ -0,0 +1,8 @@
# TESTS TO BE IGNORED WHEN A DOCKER ENGINE
# IS NOT AVAILABLE
ampa.nf
blast.nf
blast-parallel.nf
env-container.nf
env-container-with(special)chars.nf
workdir-with-blank.nf

View File

@@ -0,0 +1,14 @@
# TESTS THAT SHOULD ONLY BE RUN BY THE V2 PARSER
collect-record.nf
dynamic-filename-typed.nf
env-typed.nf
eval-out-typed.nf
nullable-path.nf
output-dsl.nf
params-dsl.nf
record-types.nf
records.nf
task-ext-block.nf
topic-channel-typed.nf
type-annotations.nf
workflow-oncomplete-v2.nf

View File

@@ -0,0 +1,47 @@
#!/bin/bash
#
# Test agent output mode error handling (NXF_AGENT_MODE=true)
#
set -e
# Run workflow with agent mode enabled (expect failure)
NXF_AGENT_MODE=true $NXF_CMD -q run $NXF_SCRIPT > stdout.txt 2> stderr.txt && {
echo "ERROR: Workflow should have failed"
exit 1
}
# Verify agent output format contains error info
if ! grep -q '\[PIPELINE\]' stdout.txt; then
echo "ERROR: Missing [PIPELINE] in agent output"
cat stdout.txt
exit 1
fi
if ! grep -q '\[ERROR\]' stdout.txt; then
echo "ERROR: Missing [ERROR] in agent output"
cat stdout.txt
exit 1
fi
if ! grep -q '\[FAILED\]' stdout.txt; then
echo "ERROR: Missing [FAILED] in agent output"
cat stdout.txt
exit 1
fi
# Verify error contains exit code
if ! grep -q 'exit: 127' stdout.txt; then
echo "ERROR: Missing exit code in error output"
cat stdout.txt
exit 1
fi
# Verify error contains workdir
if ! grep -q 'workdir:' stdout.txt; then
echo "ERROR: Missing workdir in error output"
cat stdout.txt
exit 1
fi
echo "Agent error output mode test passed"

View File

@@ -0,0 +1,46 @@
#!/bin/bash
#
# Test agent output mode (NXF_AGENT_MODE=true)
#
set -e
# Run workflow with agent mode enabled
NXF_AGENT_MODE=true $NXF_CMD -q run $NXF_SCRIPT > stdout.txt 2> stderr.txt || true
# Verify agent output format in stdout
# Should contain [PIPELINE], [WORKDIR], and [SUCCESS] or [FAILED]
if ! grep -q '\[PIPELINE\]' stdout.txt; then
echo "ERROR: Missing [PIPELINE] in agent output"
cat stdout.txt
exit 1
fi
if ! grep -q '\[WORKDIR\]' stdout.txt; then
echo "ERROR: Missing [WORKDIR] in agent output"
cat stdout.txt
exit 1
fi
if ! grep -q '\[SUCCESS\]' stdout.txt; then
echo "ERROR: Missing [SUCCESS] in agent output"
cat stdout.txt
exit 1
fi
# Verify banner is suppressed (should NOT contain "N E X T F L O W")
if grep -q 'N E X T F L O W' stdout.txt; then
echo "ERROR: Banner should be suppressed in agent mode"
cat stdout.txt
exit 1
fi
# Verify workflow output is present
if ! grep -q 'World received: Hello from agent mode' stdout.txt; then
echo "ERROR: Workflow stdout incorrect"
cat stdout.txt
exit 1
fi
echo "Agent output mode test passed"

View File

@@ -0,0 +1 @@
World received: Hello from agent mode

View File

@@ -0,0 +1,17 @@
#
# run normal mode
#
$NXF_RUN $WITH_DOCKER --out result.txt | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 5 ]] || false
cmp .expected <(sort .stdout) || false
#
# run resume mode
#
$NXF_RUN $WITH_DOCKER --out result.txt -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 5 ]] || false
cmp .expected <(sort .stdout) || false

View File

@@ -0,0 +1,15 @@
# This protein has 0 bactericidal stretches
# This protein has 0 bactericidal stretches
# This protein has 0 bactericidal stretches
# This protein has 0 bactericidal stretches
# This protein has 0 bactericidal stretches
# This protein has a mean antimicrobial value of 0.235
# This protein has a mean antimicrobial value of 0.25
# This protein has a mean antimicrobial value of 0.251
# This protein has a mean antimicrobial value of 0.266
# This protein has a mean antimicrobial value of 0.28

View File

@@ -0,0 +1,19 @@
set -e
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 2 ]] || false
diff .expected .stdout || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 2 ]] || false
diff .expected .stdout || false

View File

@@ -0,0 +1,15 @@
Aoba1>
SPVWGQGNKTQAECWEGNHNYGLVRLKEGKTISLTNDGSAVFDYLAVFLN
NVPTIYN
Bscy1>
YGEKDNLRAWWWEIEDEDERHIITMCDGEKMPLEDDNQPEYDWLAYIVGK
PYLGLLNRPV
thp1>
GIEEPRAEQGDSFGLAVLSGKNVTLIDGLHLDIDEEREKKYDYLARYQYG
PSIKKRGIYEVYTGPFDGREGTTENYGNLW
eiv1>
IRELAAVPYIQVSGPHAESEVAYGEPTLNTCYWGVIQGQWAAGSKKRVRD
N
Avhi1>
DRIIKAKRRPVVKIDSNDQIVVAGEGKWLLKAPGKWVPDRSDRYYVRFN

View File

@@ -0,0 +1,19 @@
set -e
#
# run normal mode
#
$NXF_RUN $WITH_DOCKER > stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > extract'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 1 ]] || false
#
# run resume mode
#
$NXF_RUN $WITH_DOCKER -resume > stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > extract'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > align'` == 1 ]] || false

View File

@@ -0,0 +1,284 @@
CLUSTAL FORMAT for T-COFFEE Version_11.00.8cbe486 [http://www.tcoffee.org] [MODE: ], CPU=0.00 sec, SCORE=338, Nseq=18, Len=694
lcl|1VIE_A VF-------PS----NA---------------------------T-----
lcl|1IHU_A MQFL-----QNIPPY-LFFTGKGGVGKTSISCATAIRLAEQGKRVLLVST
lcl|1ABO_B MND------PN-----L---------------------------------
lcl|1ABO_A MND------PN-----L---------------------------------
lcl|1YCS_B PEITGQVSLPP---GKR---------------------------TNL---
lcl|1IHD_C LPN-------------I---------------------------------
lcl|1IHW_B MIQ-----------------------------------------------
lcl|1IHW_A MIQ-----------------------------------------------
lcl|1IHV_B MIQ-----------------------------------------------
lcl|1IHV_A MIQ-----------------------------------------------
lcl|1YCS_A SS-----SVPS----QK---------------------------T-----
lcl|1PHT_A MS------------------------------------------------
lcl|1YCS_B_1 PEITGQVSLPP---GKR---------------------------TNL---
lcl|1YCS_B_2 PEITGQVSLPP---GKR---------------------------TNL---
lcl|1YCS_B_3 PEITGQVSLPP---GKR---------------------------TNL---
lcl|1ABO_B_1 MND------PN-----L---------------------------------
lcl|1ABO_A_1 MND------PN-----L---------------------------------
lcl|1PHT_A_1 MS------------------------------------------------
lcl|1VIE_A -----------F------------------------GM-GDRVR------
lcl|1IHU_A DPASNVGQVFSQTIGNTIQAIASVPGLSALEIDPQAAAQQYRARIVDPIK
lcl|1ABO_B ----------------------------------------FVA-------
lcl|1ABO_A ----------------------------------------FVA-------
lcl|1YCS_B ------RKTGSER-----------------------IAHGMRVKF-----
lcl|1IHD_C ------------------------------------------------T-
lcl|1IHW_B ---------------------------------------NFRVYY-----
lcl|1IHW_A ---------------------------------------NFRVYY-----
lcl|1IHV_B ---------------------------------------NFRVYY-----
lcl|1IHV_A ---------------------------------------NFRVYY-----
lcl|1YCS_A -----------YQ-----------------------GSYGFRLGF-----
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 ------RKTGSER-----------------------IAHGMRVKF-----
lcl|1YCS_B_2 ------RKTGSER-----------------------IAHGMRVKF-----
lcl|1YCS_B_3 ------RKTGSER-----------------------IAHGMRVKF-----
lcl|1ABO_B_1 ----------------------------------------FVA-------
lcl|1ABO_A_1 ----------------------------------------FVA-------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A --------------------------KKSGA-------------------
lcl|1IHU_A GVLPDDVVSSINEQLSGACTTEIAAFDE-FTGLLTDASLLTRFDHIIFDT
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B --------------------------NPLPLALLLDSSLEGEFDLV----
lcl|1IHD_C -------------------------------ILATGGTIAGGGDSA----
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------LHSGTA------------------
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 --------------------------NPLPLALLLDSSLEGEFDLV----
lcl|1YCS_B_2 --------------------------NPLPLALLLDSSLEGEFDLV----
lcl|1YCS_B_3 --------------------------NPLPLALLLDSSLEGEFDLV----
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A APTGHTIRLLQLPGAWSSFIDSNPEGASCLGPMAGLEKQREQYAYAVEAL
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B --------------------------------------------------
lcl|1IHD_C --------------------------------------------------
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 --------------------------------------------------
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 --------------------------------------------------
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A SDPKRTRLVLVARLQKSTLQEVARTHLELAAIGLKNQYLVINGVLPKTEA
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B --------------------------------------------------
lcl|1IHD_C --------------------------------------------------
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 --------------------------------------------------
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 --------------------------------------------------
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A ANDTLAAAI----------WEREQEALANLPADLAGLPTDTLFLQPVNMV
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B -----QRIIYEVDDPSLPND-----------------------------E
lcl|1IHD_C -----TKSN----------YTVG-------------------------KV
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A -------------A------------------------------------
lcl|1YCS_B_1 -----QRIIYEVDDPSLPND-----------------------------E
lcl|1YCS_B_2 -----QRIIYEVDDPSLPND-----------------------------E
lcl|1YCS_B_3 -----QRIIYEVDDPSLPND-----------------------------E
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 -------------A------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A GVSALSRLLSTQPVASPSSDEYLQQRPDIPSLSALVDDIARNEHGLI---
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B GITALHN------------------------------AVCAGHTEIVKFL
lcl|1IHD_C GVE-----------------------------------------------
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A -----KS------------------------------VTC----------
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 GITALHN------------------------------AVCAGHTEIVKFL
lcl|1YCS_B_2 GITALHN------------------------------AVCAGHTEIVKFL
lcl|1YCS_B_3 GITALHN------------------------------AVCAGHTEIVKFL
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A -------------AWQGQIVGWYCTNLTPE--GYAVES----EAHPGSVQ
lcl|1IHU_A ----------------------------------M---------------
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B VQFGVNVNAADSDGWTPLHCAASCNNVQVC--KFLVES----GAAVFAMT
lcl|1IHD_C ----------------------------------N---------------
lcl|1IHW_B -------R------------------------------------------
lcl|1IHW_A -------R------------------------------------------
lcl|1IHV_B -------R------------------------------------------
lcl|1IHV_A -------R------------------------------------------
lcl|1YCS_A -------------TYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMA
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 VQFGVNVNAADSDGWTPLHCAASCNNVQVC--KFLVES----GAAVFAMT
lcl|1YCS_B_2 VQFGVNVNAADSDGWTPLHCAASCNNVQVC--KFLVES----GAAVFAMT
lcl|1YCS_B_3 VQFGVNVNAADSDGWTPLHCAASCNNVQVC--KFLVES----GAAVFAMT
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A -----I--------------------------------------------
lcl|1IHU_A -------------------------------------------LMGKGGV
lcl|1ABO_B -------------------------------------------LYDFVAS
lcl|1ABO_A -------------------------------------------LYDFVAS
lcl|1YCS_B YSDMQTAADKCEEMEEGYTQCSQFLYGVQEKMGIMNKGV-IYALWDYEPQ
lcl|1IHD_C -------------------------------------------LVNAVPQ
lcl|1IHW_B ------------------------------------------DSRDPVWK
lcl|1IHW_A ------------------------------------------DSRDPVWK
lcl|1IHV_B ------------------------------------------DSRDPVWK
lcl|1IHV_A ------------------------------------------DSRDPVWK
lcl|1YCS_A -----I--------------------------------------------
lcl|1PHT_A ------------------------------------EGYQYRALYDYKKE
lcl|1YCS_B_1 YSDMQTAADKCEEMEEGYTQCSQFLYGVQEKMGIMNKGV-IYALWDYEPQ
lcl|1YCS_B_2 YSDMQTAADKCEEMEEGYTQCSQFLYG-----------------------
lcl|1YCS_B_3 YSDMQTAADKCEEMEEGYTQCSQFLYGVQEKMGIMNKGV-IYALWDYEPQ
lcl|1ABO_B_1 -------------------------------------------LYDFVAS
lcl|1ABO_A_1 -------------------------------------------LYDFVAS
lcl|1PHT_A_1 ------------------------------------EGYQYRALYDYKKE
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A GKTTMAAAIAVRLADMGFD------VHLTTSDP-------AAHLS-MTLN
lcl|1ABO_B GDNTLS----ITKGEKLRV--------LGYNH-------NGEWCE---AQ
lcl|1ABO_A GDNTLS----ITKGEKLRV--------LGYNH-------NGEWCE---AQ
lcl|1YCS_B NDDELPM----KEGDCMTI--------IHREDED-----EIEWWW---AR
lcl|1IHD_C -LKDIA----NVKGEQVVN--------IGSQDMN-----DNVWLT---LA
lcl|1IHW_B GPAKL-----LWKGEGAVV--------IQDNS-------DIK--------
lcl|1IHW_A GPAKL-----LWKGEGAVV--------IQDNS-------DIK--------
lcl|1IHV_B GPAKL-----LWKGEGAVV--------IQDNS-------DIK--------
lcl|1IHV_A GPAKL-----LWKGEGAVV--------IQDNS-------DIK--------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A REEDIDL----HLGDILTVNKGSLVA-LGFSDGQEARPEEIGWLNGY-NE
lcl|1YCS_B_1 NDDELPM----KEGDCMTI--------IHREDED-----EIEWWW---AR
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 NDDELPM----KEGDCMTI--------IHREDED-----EIEWWW---AR
lcl|1ABO_B_1 GDNTLS----ITKGEKLRV--------LGYNH-------NGEWCE---AQ
lcl|1ABO_A_1 GDNTLS----ITKGEKLRV--------LGYNH-------NGEWCE---AQ
lcl|1PHT_A_1 REEDIDL----HLGDILTVNKGSLVA-LGFSDGQEARPEEIGWLNGY-NE
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A GSLNNLQVSRIDPHEETERYRQHVLETKGKELDEAGKRLLEEDLRSPCTE
lcl|1ABO_B --TK----------------------------------------------
lcl|1ABO_A --TK----------------------------------------------
lcl|1YCS_B -L-N----------------------------------------------
lcl|1IHD_C KKIN----------------------------------------------
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A -T-T----------------------------------------------
lcl|1YCS_B_1 -L-N----------------------------------------------
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 -L-N----------------------------------------------
lcl|1ABO_B_1 --TK----------------------------------------------
lcl|1ABO_A_1 --TK----------------------------------------------
lcl|1PHT_A_1 -T-T----------------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A EIAVFQAFSRVIREAGKRFVVMDTAPTGHTLLLLDATGAYHREIAKKMGE
lcl|1ABO_B --------------------------------------------------
lcl|1ABO_A --------------------------------------------------
lcl|1YCS_B --------------------------------------------------
lcl|1IHD_C -------------TDCDKT-------------------------------
lcl|1IHW_B --------------------------------------------------
lcl|1IHW_A --------------------------------------------------
lcl|1IHV_B --------------------------------------------------
lcl|1IHV_A --------------------------------------------------
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A --------------------------------------------------
lcl|1YCS_B_1 --------------------------------------------------
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 --------------------------------------------------
lcl|1ABO_B_1 --------------------------------------------------
lcl|1ABO_A_1 --------------------------------------------------
lcl|1PHT_A_1 --------------------------------------------------
lcl|1VIE_A --------------------------------------------------
lcl|1IHU_A KGHFTTPMMLLQDPERTKVLLVTLPETTPVLEAANLQADLERAGIHPWGW
lcl|1ABO_B ---------------------------------------------NGQGW
lcl|1ABO_A ---------------------------------------------NGQGW
lcl|1YCS_B ---------------------------------------------DKEGY
lcl|1IHD_C --------------------------------------------------
lcl|1IHW_B -------------------------------------------------V
lcl|1IHW_A -------------------------------------------------V
lcl|1IHV_B -------------------------------------------------V
lcl|1IHV_A -------------------------------------------------V
lcl|1YCS_A --------------------------------------------------
lcl|1PHT_A ---------------------------------------------GERGD
lcl|1YCS_B_1 ---------------------------------------------DKEGY
lcl|1YCS_B_2 --------------------------------------------------
lcl|1YCS_B_3 ---------------------------------------------DKEGY
lcl|1ABO_B_1 ---------------------------------------------NGQGW
lcl|1ABO_A_1 ---------------------------------------------NGQGW
lcl|1PHT_A_1 ---------------------------------------------GERGD
lcl|1VIE_A Y-PVAA-LERI---------------------N-----------
lcl|1IHU_A I-INNS-LSIADTRSPLLRMRAQQELPQIESVKR----QHAS--
lcl|1ABO_B V-PSNY-ITPV---------------------NS----------
lcl|1ABO_A V-PSNY-ITPV---------------------NS----------
lcl|1YCS_B V-PRNL-LGLY---------------------PRIKPRQRSL-A
lcl|1IHD_C --------------------------------------------
lcl|1IHW_B V-PRRKA-KII----------------------RD---------
lcl|1IHW_A V-PRRKA-KII----------------------RD---------
lcl|1IHV_B V-PRRKA-KII----------------------RD---------
lcl|1IHV_A V-PRRKA-KII----------------------RD---------
lcl|1YCS_A YKQSQHMTEV----------------------V-----------
lcl|1PHT_A F-PGTY-VEYI---------------------GR----KKISPP
lcl|1YCS_B_1 V-PRNL-LGLY---------------------PRIKPRQRSL-A
lcl|1YCS_B_2 --------------------------------------------
lcl|1YCS_B_3 V-PRNL-LGLY---------------------PRIKPRQRSL-A
lcl|1ABO_B_1 V-PSNY-ITPV---------------------NS----------
lcl|1ABO_A_1 V-PSNY-ITPV---------------------NS----------
lcl|1PHT_A_1 F-PGTY-VEYI---------------------GR---------K

View File

@@ -0,0 +1,20 @@
set -e
#
# run normal mode
#
$NXF_RUN $WITH_DOCKER | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > sort'` == 1 ]] || false
diff .expected .stdout || false
#
# run resume mode
#
$NXF_RUN $WITH_DOCKER -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > sort'` == 1 ]] || false
diff .expected .stdout || false

View File

@@ -0,0 +1,34 @@
1aboA 1ABO:A 100.00 57 0 0 1 57 5 61 2e-40 120
1aboA 1ABO:B 100.00 57 0 0 1 57 5 61 2e-40 120
1aboA 1IHD:A 36.11 36 21 1 5 40 287 320 0.62 18.1
1aboA 1IHD:A 75.00 8 2 0 28 35 179 186 0.69 17.7
1aboA 1IHD:C 36.11 36 21 1 5 40 287 320 0.62 18.1
1aboA 1IHD:C 75.00 8 2 0 28 35 179 186 0.69 17.7
1aboA 1YCS:B 25.49 51 36 1 5 53 175 225 3e-04 27.3
1ihvA 1IHN:A 35.00 20 13 0 25 44 72 91 7.0 14.6
1ihvA 1IHN:A 66.67 9 3 0 35 43 28 36 3.7 15.4
1ihvA 1IHN:B 35.00 20 13 0 25 44 72 91 7.0 14.6
1ihvA 1IHN:B 66.67 9 3 0 35 43 28 36 3.7 15.4
1ihvA 1IHU:A 27.27 33 24 0 8 40 534 566 5.5 15.0
1ihvA 1IHV:A 100.00 49 0 0 1 49 4 52 3e-32 99.8
1ihvA 1IHV:B 100.00 49 0 0 1 49 4 52 3e-32 99.8
1ihvA 1IHW:A 100.00 49 0 0 1 49 4 52 3e-32 99.8
1ihvA 1IHW:B 100.00 49 0 0 1 49 4 52 3e-32 99.8
1ihvA 1YCS:A 54.55 11 5 0 1 11 107 117 0.88 17.3
1pht 1IHF:B 33.33 21 14 0 53 73 60 80 0.75 18.1
1pht 1IHS:H 32.00 25 17 0 40 64 175 199 4.0 16.5
1pht 1IHT:H 32.00 25 17 0 40 64 175 199 4.0 16.5
1pht 1PHT:A 100.00 80 0 0 1 80 5 84 1e-56 164
1pht 1YCS:B 23.08 26 20 0 19 44 115 140 3.4 16.5
1pht 1YCS:B 30.43 23 16 0 6 28 175 197 0.015 23.5
1vie 1IHM:A 31.82 22 11 1 19 40 343 360 9.0 14.6
1vie 1IHM:B 31.82 22 11 1 19 40 343 360 9.0 14.6
1vie 1IHM:C 31.82 22 11 1 19 40 343 360 9.0 14.6
1vie 1IHU:A 26.92 26 18 1 25 49 156 181 8.5 14.6
1vie 1VIE:A 100.00 51 0 0 1 51 12 62 1e-35 108
1ycsB 1ABO:A 24.07 54 39 1 3 56 6 57 4e-05 28.5
1ycsB 1ABO:B 24.07 54 39 1 3 56 6 57 4e-05 28.5
1ycsB 1IHU:A 35.71 14 9 0 6 19 251 264 6.9 15.4
1ycsB 1PHT:A 30.43 23 16 0 6 28 10 32 0.013 22.3
1ycsB 1YCS:B 100.00 60 0 0 1 60 170 229 3e-42 131

View File

@@ -0,0 +1,21 @@
set -e
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep -c 'Submitted process > blastThemAll' .nextflow.log` == 3 ]] || false
[[ `grep -c 'p1.fa p2.fa' .stdout` == 1 ]] || false
[[ `grep -c 'p3.fa p4.fa' .stdout` == 1 ]] || false
[[ `grep -c 'p5.fa' .stdout` == 1 ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep -c 'Cached process > blastThemAll' .nextflow.log` == 3 ]] || false
[[ `grep -c 'p1.fa p2.fa' .stdout` == 1 ]] || false
[[ `grep -c 'p3.fa p4.fa' .stdout` == 1 ]] || false
[[ `grep -c 'p5.fa' .stdout` == 1 ]] || false

View File

@@ -0,0 +1,42 @@
set -e
# Skip test if AWS keys are missing
if [[ ! $AWS_ACCESS_KEY_ID ]]; then
echo "Skip cache-bak test since AWS keys are not available"
exit 0
fi
#
# setup env
#
export NXF_IGNORE_RESUME_HISTORY=true
export NXF_UUID=$(uuidgen | tr [:upper:] [:lower:])
#
# run normal mode
#
$NXF_RUN -name test_1 | tee .stdout
[[ `grep -c 'Submitted process > foo' .nextflow.log` == 1 ]] || false
#
# backup cache
#
NXF_WORK=s3://nextflow-ci/cache-test \
$NXF_CMD -log .nextflow-backup.log plugin nf-tower:cache-backup
#
# remove it
#
rm -rf .nextflow
#
# restore cache
#
NXF_WORK=s3://nextflow-ci/cache-test \
$NXF_CMD -log .nextflow-restore.log plugin nf-tower:cache-restore
#
# run resume mode
#
$NXF_RUN -name test_2 -resume $NXF_UUID | tee .stdout
[[ `grep -c 'Cached process > foo' .nextflow.log` == 1 ]] || false

View File

@@ -0,0 +1,15 @@
set -e
#
# run normal mode
#
$NXF_RUN --chunkSize 3 --input .data.fa | tee .stdout
[[ `grep -c 'Submitted process > foo' .nextflow.log` == 2 ]] || false
#
# run resume mode
#
$NXF_RUN -resume --chunkSize 3 --input .data.fa | tee .stdout
[[ `grep -c 'Cached process > foo' .nextflow.log` == 2 ]] || false

View File

@@ -0,0 +1,14 @@
>1aboA
NLFVALYDFVASGDNTLSITKGEKLRVLGYNHNGEWCEAQTKNGQGWVPS
NYITPVN
>1ycsB
KGVIYALWDYEPQNDDELPMKEGDCMTIIHREDEDEIEWWWARLNDKEGY
VPRNLLGLYP
>1pht
GYQYRALYDYKKEREEDIDLHLGDILTVNKGSLVALGFSDGQEARPEEIG
WLNGYNETTGERGDFPGTYVEYIGRKKISP
>1vie
DRVRKKSGAAWQGQIVGWYCTNLTPEGYAVESEAHPGSVQIYPVAALERI
N
>1ihvA
NFRVYYRDSRDPVWKGPAKLLWKGEGAVVIQDNSDIKVVPRRKAKIIRD

View File

@@ -0,0 +1,35 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN --alpha uno --beta \* --delta 'x_{1,2}.fasta' --gamma hello\ world --omega '--foo bar' a b c | tee stdout
< stdout grep -F 'alpha: uno'
< stdout grep -F 'beta : *'
< stdout grep -F 'delta: x_{1,2}.fasta'
< stdout grep -F 'gamma: hello world'
< stdout grep -F 'omega: --foo bar'
< stdout grep -F 'args : a_b_c'
#
# check quotes
#
echo ''
$NXF_RUN --alpha "a'b" --beta 'a"b' --delta 'x' --gamma "x" --omega x "a b c" | tee stdout
< stdout grep -F "alpha: a'b"
< stdout grep -F 'beta : a"b'
< stdout grep -F 'delta: x'
< stdout grep -F 'gamma: x'
< stdout grep -F 'omega: x'
< stdout grep -F 'args : a b c'
#
# check the log command handle properly quoted filter options
#
$NXF_CMD -log .nextflow.log log last -F 'container = "ubuntu"' | tee log
[[ $? == 0 ]] || exit 1
$NXF_CMD -log .nextflow.log log last -F "container = 'ubuntu'" | tee log
[[ $? == 0 ]] || exit 1

View File

@@ -0,0 +1,20 @@
# Skip test if AWS keys are missing
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Missing AWS credentials -- Skipping test"
exit 0
fi
## random file name
NAME=test-cmd-$(basename `mktemp`).file
## create random file
head -c 1000000 </dev/urandom >myfile
## upload it
$NXF_CMD -log cmd-fs-1.log fs cp myfile s3://nextflow-ci/$NAME
## download it
$NXF_CMD -log cmd-fs-2.log fs cp s3://nextflow-ci/$NAME $NAME
## check they are equals
diff myfile $NAME || false

View File

@@ -0,0 +1,8 @@
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
[[ `<stdout grep -c 'Entries are saved to file'` == 1 ]] || false
[[ `<stdout grep -c 'alpha'` == 1 ]] || false
[[ `<stdout grep -c 'beta'` == 1 ]] || false
[[ `<stdout grep -c 'gamma'` == 1 ]] || false

View File

@@ -0,0 +1,34 @@
set -e
#
# run normal mode
#
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > align'` == 6 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > merge'` == 2 ]] || false
[[ `grep -c 'barcode: alpha' stdout` == 1 ]] || false
[[ `grep -c 'barcode: gamma' stdout` == 1 ]] || false
[[ `grep -c 'bam : bam1 bam2 bam3' stdout` == 2 ]] || false
[[ `grep -c 'bai : bai1 bai2 bai3' stdout` == 2 ]] || false
[[ `grep -c 'seq_ids' stdout` == 2 ]] || false
#
# RESUME mode
#
echo ''
echo \$ $NXF_RUN -resume
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > align'` == 6 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > merge'` == 2 ]] || false
[[ `grep -c 'barcode: alpha' stdout` == 1 ]] || false
[[ `grep -c 'barcode: gamma' stdout` == 1 ]] || false
[[ `grep -c 'bam : bam1 bam2 bam3' stdout` == 2 ]] || false
[[ `grep -c 'bai : bai1 bai2 bai3' stdout` == 2 ]] || false
[[ `grep -c 'seq_ids' stdout` == 2 ]] || false

View File

@@ -0,0 +1,34 @@
set -e
#
# run normal mode
#
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > algn'` == 6 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > merge'` == 2 ]] || false
[[ `grep -c 'barcode: alpha' stdout` == 1 ]] || false
[[ `grep -c 'barcode: gamma' stdout` == 1 ]] || false
[[ `grep -c 'bam : bam1 bam2 bam3' stdout` == 2 ]] || false
[[ `grep -c 'bai : bai1 bai2 bai3' stdout` == 2 ]] || false
[[ `grep -c 'seq_ids' stdout` == 2 ]] || false
#
# RESUME mode
#
echo ''
echo \$ $NXF_RUN -resume
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > algn'` == 6 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > merge'` == 2 ]] || false
[[ `grep -c 'barcode: alpha' stdout` == 1 ]] || false
[[ `grep -c 'barcode: gamma' stdout` == 1 ]] || false
[[ `grep -c 'bam : bam1 bam2 bam3' stdout` == 2 ]] || false
[[ `grep -c 'bai : bai1 bai2 bai3' stdout` == 2 ]] || false
[[ `grep -c 'seq_ids' stdout` == 2 ]] || false

View File

@@ -0,0 +1,44 @@
set -e
#
# basic run
#
echo ''
$NXF_RUN > stdout
[[ `<stdout grep -c 'Hello world!'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > bar'` == 1 ]] || false
( cd foo;
[[ -s f1.fa ]] || false
[[ -s f2.fa ]] || false
[[ -s f3.fa ]] || false
[[ -s hello.txt ]] || false
[[ -s sample.zip ]] || false
[[ -s sample.html ]] || false
[[ -s '01_A(R1).fastq' ]] || false
[[ -s '01_A(R2).fastq' ]] || false
[[ -s 'sample_(1 2).vcf' ]] || false
[[ -s .alpha/hello.txt ]] || false
)
#
# resume
#
rm -rf foo
echo ''
$NXF_RUN -resume > stdout
[[ `<stdout grep -c 'Hello world!'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > bar'` == 1 ]] || false
( cd foo;
[[ -s f1.fa ]] || false
[[ -s f2.fa ]] || false
[[ -s f3.fa ]] || false
[[ -s hello.txt ]] || false
[[ -s sample.zip ]] || false
[[ -s sample.html ]] || false
[[ -s '01_A(R1).fastq' ]] || false
[[ -s '01_A(R2).fastq' ]] || false
[[ -s 'sample_(1 2).vcf' ]] || false
[[ -s .alpha/hello.txt ]] || false
)

View File

@@ -0,0 +1,39 @@
# apply labels for profile `test1`
$NXF_RUN -c ../../config-labels.config -profile test1 | tee stdout
< stdout grep "alpha memry: 20 MB" || false
< stdout grep "alpha queue: std" || false
< stdout grep "beta memry: 10 MB" || false
< stdout grep "beta queue: small" || false
< stdout grep "delta memry: 70 MB" || false
< stdout grep "delta queue: big" || false
< stdout grep "gamma memry: 70 MB" || false
< stdout grep "gamma queue: big" || false
# apply labels for profile `test2`
$NXF_RUN -c ../../config-labels.config -profile test2 | tee stdout
< stdout grep "beta memry: 10 MB" || false
< stdout grep "beta queue: small" || false
< stdout grep "alpha memry: 70 MB" || false
< stdout grep "alpha queue: big" || false
< stdout grep "delta memry: 70 MB" || false
< stdout grep "delta queue: big" || false
< stdout grep "gamma memry: 70 MB" || false
< stdout grep "gamma queue: big" || false
# apply labels for profile `test3`
$NXF_RUN -c ../../config-labels.config -profile test3 | tee stdout
< stdout grep "beta memry: 50 MB" || false
< stdout grep "beta queue: all" || false
< stdout grep "alpha memry: 50 MB" || false
< stdout grep "alpha queue: all" || false
< stdout grep "delta memry: 50 MB" || false
< stdout grep "delta queue: all" || false
< stdout grep "gamma memry: 60 MB" || false
< stdout grep "gamma queue: foo" || false

View File

@@ -0,0 +1,11 @@
set -e
$NXF_CMD secrets set MY_SECRET hello-world
$NXF_RUN -c ../../config-secrets.config | tee stdout
< .nextflow.log grep "Config file used secrets -- reloading config with secrets provider" || false
< stdout grep "outputDir: results-hello-world" || false
$NXF_CMD secrets delete MY_SECRET

View File

@@ -0,0 +1,20 @@
#
# run normal mode
#
$NXF_RUN -c ../../config-vars.config | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 2 ]] || false
< stdout grep "foo 1,2" || false
< stdout grep "bar 3,4" || false
#
# run resume mode
#
$NXF_RUN -c ../../config-vars.config -resume | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 2 ]] || false
< stdout grep "foo 1,2" || false
< stdout grep "bar 3,4" || false

View File

@@ -0,0 +1,21 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process '` == 1 ]] || false
[[ -f outputDir/testFile.txt ]] || false
[[ -L outputDir/testFileLink.txt ]] || false
#
# run resume mode
#
rm -rf outputDir
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process '` == 1 ]] || false
[[ -f outputDir/testFile.txt ]] || false
[[ -L outputDir/testFileLink.txt ]] || false

View File

@@ -0,0 +1,23 @@
#
# check the ability to load custom script/classes in the
# local `lib` directory
#
set -e
# copy the test script in this directory
cp ${NXF_SCRIPT:-../../custom-lib.nf} test.nf
# crate a library class
mkdir -p lib
cat >lib/Foo.groovy <<EOL
class Foo {
static String hello() { "Hello world!" }
}
EOL
${NXF_CMD:-nextflow} run test.nf | tee stdout
[[ `< stdout grep -c 'Hello world!'` == 1 ]] || false

View File

@@ -0,0 +1,32 @@
set -e
#
# run normal mode
#
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > sayHello'` == 5 ]] || false
[[ `grep 'Hola world!' stdout` ]] || false
[[ `grep 'Γεια σου world!' stdout` ]] || false
[[ `grep 'Hello world!' stdout` ]] || false
[[ `grep 'Bojour world!' stdout` ]] || false
[[ `grep 'Ciao world!' stdout` ]] || false
#
# RESUME mode
#
echo ''
echo \$ $NXF_RUN -resume
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > sayHello'` == 5 ]] || false
[[ `grep 'Hola world!' stdout` ]] || false
[[ `grep 'Γεια σου world!' stdout` ]] || false
[[ `grep 'Hello world!' stdout` ]] || false
[[ `grep 'Bojour world!' stdout` ]] || false
[[ `grep 'Ciao world!' stdout` ]] || false

View File

@@ -0,0 +1,2 @@
1234567890
1234567890

View File

@@ -0,0 +1,18 @@
set -e
#
# run normal mode
#
$NXF_RUN -process.debug | tee stdout
[[ `< .nextflow.log grep -c 'Submitted process'` == 2 ]] || false
[[ `< stdout grep 'task=.small.txt mem=100 MB'` ]] || false
[[ `< stdout grep 'task=.big.txt mem=200 MB'` ]] || false
#
# run resume mode
#
$NXF_RUN -process.debug -resume | tee stdout
[[ `< .nextflow.log grep -c 'Cached process'` == 2 ]] || false

View File

@@ -0,0 +1 @@
12345

View File

@@ -0,0 +1,45 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN --input .data.txt | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 4 ]] || false
grep '~ Saving my_delta.txt' stdout
grep '~ Saving my_omega.txt' stdout
grep '~ Saving my_gamma.txt' stdout
grep '~ Saving my_alpha.txt' stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt
diff my_alpha.txt .expected
diff my_delta.txt .expected
diff my_gamma.txt .expected
diff my_omega.txt .expected
rm my_*
#
# RESUME mode
#
echo ''
$NXF_RUN --input .data.txt -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 4 ]] || false
grep '~ Saving my_delta.txt' stdout
grep '~ Saving my_omega.txt' stdout
grep '~ Saving my_gamma.txt' stdout
grep '~ Saving my_alpha.txt' stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt

View File

@@ -0,0 +1 @@
Hello

View File

@@ -0,0 +1,2 @@
Hello
World

View File

@@ -0,0 +1,45 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 4 ]] || false
grep '~ Saving my_delta.txt' stdout
grep '~ Saving my_omega.txt' stdout
grep '~ Saving my_gamma.txt' stdout
grep '~ Saving my_alpha.txt' stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt
diff my_alpha.txt .expected
diff my_delta.txt .expected
diff my_gamma.txt .expected
diff my_omega.txt .expected
rm my_*
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 4 ]] || false
grep '~ Saving my_delta.txt' stdout
grep '~ Saving my_omega.txt' stdout
grep '~ Saving my_gamma.txt' stdout
grep '~ Saving my_alpha.txt' stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt

View File

@@ -0,0 +1,2 @@
Hello
World

View File

@@ -0,0 +1,76 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 4 ]] || false
grep "Result $PWD/cache/omega/result.txt" stdout
grep "Result $PWD/cache/delta/result.txt" stdout
grep "Result $PWD/cache/alpha/result.txt" stdout
grep "Result $PWD/cache/gamma/result.txt" stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt
diff my_alpha.txt .expected
diff my_delta.txt .expected
diff my_gamma.txt .expected
diff my_omega.txt .expected
rm my_*
#
# run normal mode -- this time store result are used
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -E -c '\[skipping\] Stored process > foo'` == 4 ]] || false
grep "Result $PWD/cache/omega/result.txt" stdout
grep "Result $PWD/cache/delta/result.txt" stdout
grep "Result $PWD/cache/alpha/result.txt" stdout
grep "Result $PWD/cache/gamma/result.txt" stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt
diff my_alpha.txt .expected
diff my_delta.txt .expected
diff my_gamma.txt .expected
diff my_omega.txt .expected
rm my_*
#
# run resume mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -E -c '\[skipping\] Stored process > foo'` == 4 ]] || false
grep "Result $PWD/cache/omega/result.txt" stdout
grep "Result $PWD/cache/delta/result.txt" stdout
grep "Result $PWD/cache/alpha/result.txt" stdout
grep "Result $PWD/cache/gamma/result.txt" stdout
test -f my_alpha.txt
test -f my_delta.txt
test -f my_gamma.txt
test -f my_omega.txt
diff my_alpha.txt .expected
diff my_delta.txt .expected
diff my_gamma.txt .expected
diff my_omega.txt .expected

View File

@@ -0,0 +1,2 @@
Hello
World

View File

@@ -0,0 +1,35 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo (p1.fa)'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo (p2.fa)'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo (p3.fa)'` == 1 ]] || false
[[ `< stdout grep -c '>1ycsB'` == 2 ]] || false
[[ `< stdout grep -c '>1pht'` == 2 ]] || false
[[ `< stdout grep -c '>1aboA'` == 1 ]] || false
[[ `< stdout grep -c '>1ihvA'` == 1 ]] || false
[[ `< stdout grep -c '>1vie'` == 1 ]] || false
#
# run resume mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo (p1.fa)'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo (p2.fa)'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo (p3.fa)'` == 1 ]] || false
[[ `< stdout grep -c '>1ycsB'` == 2 ]] || false
[[ `< stdout grep -c '>1pht'` == 2 ]] || false
[[ `< stdout grep -c '>1aboA'` == 1 ]] || false
[[ `< stdout grep -c '>1ihvA'` == 1 ]] || false
[[ `< stdout grep -c '>1vie'` == 1 ]] || false

View File

@@ -0,0 +1,78 @@
set -e
export NXF_ANSI_LOG=false
#
# create the `hello.sh` executable script
#
mkdir -p bin
echo "echo Hola mundo" > bin/hello.sh
chmod +x bin/hello.sh
#
# create the nextflow config file
#
cat << EOF > nextflow.config
env.FOO = 'HOLA'
process.container = 'quay.io/nextflow/bash'
EOF
#
# create the nextflow script
#
cat << EOF > foo.nf
process foo {
debug true
input:
env 'BAR'
script:
'''
env | grep -E "^(FOO|BAR)" | sort
hello.sh
'''
}
workflow {
channel.value('Hello World!') | foo
}
EOF
#
# not the testing part
#
# NF plain run
$NXF_CMD run foo.nf | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with trace
$NXF_CMD run foo.nf -with-trace | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with docker
$NXF_CMD run foo.nf -with-docker | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with docker and trace
$NXF_CMD run foo.nf -with-trace -with-docker | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false

View File

@@ -0,0 +1,78 @@
set -e
export NXF_ANSI_LOG=false
#
# create the `hello.sh` executable script
#
mkdir -p bin
echo "echo Hola mundo" > bin/hello.sh
chmod +x bin/hello.sh
#
# create the nextflow config file
#
cat << EOF > nextflow.config
env.FOO = 'HOLA'
process.container = 'quay.io/nextflow/bash'
EOF
#
# create the nextflow script
#
cat << EOF > foo.nf
process foo {
debug true
input:
env 'BAR'
script:
'''
env | grep -E "^(FOO|BAR)" | sort
hello.sh
'''
}
workflow {
channel.value('Hello World!') | foo
}
EOF
#
# not the testing part
#
# NF plain run
$NXF_CMD run foo.nf | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with trace
$NXF_CMD run foo.nf -with-trace | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with docker
$NXF_CMD run foo.nf -with-docker | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false
# NF run with docker and trace
$NXF_CMD run foo.nf -with-trace -with-docker | tee stdout
# run tests
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c 'FOO=HOLA'` == 1 ]] || false
[[ `< stdout grep -c 'BAR=Hello World!'` == 1 ]] || false
[[ `< stdout grep -c 'Hola mundo'` == 1 ]] || false

View File

@@ -0,0 +1,17 @@
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 2 ]] || false
[[ `< .stdout grep 'bar says Hello'` ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 2 ]] || false
[[ `< .stdout grep 'bar says Hello'` ]] || false

View File

@@ -0,0 +1,17 @@
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 2 ]] || false
[[ `< .stdout grep 'bar says Hello'` ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 2 ]] || false
[[ `< .stdout grep 'bar says Hello'` ]] || false

View File

@@ -0,0 +1,21 @@
set -e
export NXF_ASSETS=$PWD/assets
#
# First run test `success` is `true`
#
set +e
echo ''
$NXF_RUN > stdout
status=$?
set -e
# the exit status must NOT be zero because the pipeline throws an error
[ $status -ne 0 ] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 3 ]] || false
[[ `grep -c 'success: false' stdout` == 1 ]] || false
[[ `grep -c 'exitStatus: 99' stdout` == 1 ]] || false
[[ `grep -c 'run_1' stdout` == 1 ]] || false
[[ `grep -c 'run_2' stdout` == 1 ]] || false

View File

@@ -0,0 +1,13 @@
set -e
set +e
echo ''
$NXF_CMD -q run $NXF_SCRIPT -c .config > stdout
status=$?
set -e
[ $status -ne 0 ] || false
[[ `< .nextflow.log grep -c 'Submitted process > foo'` == 3 ]] || false
[[ `< .nextflow.log grep -c 'Submitted process > bar'` == 1 ]] || false
[[ `< .nextflow.log grep -c 'Error is ignored'` == 1 ]] || false

View File

@@ -0,0 +1,6 @@
workflow {
failOnIgnore = true
}
process {
errorStrategy = 'ignore'
}

View File

@@ -0,0 +1,11 @@
set +e
$NXF_RUN | tee stdout
set -e
if [[ "$NXF_SYNTAX_PARSER" == "v2" ]] ; then
# strict parser should give compile-time error
< stdout grep "error-message.nf:19:1: \`printx\` is not defined"
else
# legacy parser should give runtime error
< stdout grep "Check script '.*error-message.nf' at line: 19"
fi

View File

@@ -0,0 +1,23 @@
set -e
#
# run normal mode
#
$NXF_RUN -c .config | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > task1'` == 3 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > task2'` == 3 ]] || false
[[ `grep 'NOTE' .nextflow.log | grep -E -c "Process .* terminated with an error exit status"` == 3 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -c .config -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > task1'` == 3 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > task2'` == 3 ]] || false
[[ `grep 'NOTE' .nextflow.log | grep -E -c "Process .* terminated with an error exit status"` == 3 ]] || false

View File

@@ -0,0 +1 @@
process.errorStrategy = { task.exitStatus >= 1 ? 'retry' : 'ignore' }

View File

@@ -0,0 +1,24 @@
set -e
mkdir \[work-dir\]
#
# run normal mode
#
$NXF_RUN -w \[work-dir\] | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file[a-b].txt'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file-*.txt'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file-?.txt'` == 1 ]] || false
#
# run resume mode
#
$NXF_RUN -w \[work-dir\] -resume | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file[a-b].txt'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file-*.txt'` == 1 ]] || false
[[ `< stdout grep -c -F 'match: file-?.txt'` == 1 ]] || false

View File

@@ -0,0 +1,17 @@
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< .stdout grep 'GNU bash'` ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false
[[ `< .stdout grep 'GNU bash'` ]] || false

View File

@@ -0,0 +1,17 @@
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
[[ `< .stdout grep 'GNU bash'` ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false
[[ `< .stdout grep 'GNU bash'` ]] || false

View File

@@ -0,0 +1,10 @@
set +e
set -o pipefail
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
# must return a non-zero exit status
[[ $? == 0 ]] && exit 1
[[ `<stdout grep -c 'Channel empty terminating'` == 1 ]] || false

View File

@@ -0,0 +1,18 @@
set +e
#
# run normal mode
#
echo ''
$NXF_RUN
[[ $? == 0 ]] && exit 1
#
# RESUME mode
#
echo ''
$NXF_RUN -resume
[[ $? == 0 ]] && exit 1
exit 0

View File

@@ -0,0 +1,21 @@
set -e
export NXF_ANSI_LOG=false
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 26 ]] || false
cmp stdout .expected || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 26 ]] || false
cmp stdout .expected || false

View File

@@ -0,0 +1,26 @@
[1, a]
[2, b]
[3, c]
[4, d]
[5, e]
[6, f]
[7, g]
[8, h]
[9, i]
[10, j]
[11, k]
[12, l]
[13, m]
[14, n]
[15, o]
[16, p]
[17, q]
[18, r]
[19, s]
[20, t]
[21, u]
[22, v]
[23, w]
[24, x]
[25, y]
[26, z]

View File

@@ -0,0 +1,20 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `< .nextflow.log grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `< stdout grep -c 'Hello' ` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `< .nextflow.log grep -c 'Cached process > foo'` == 1 ]] || false
[[ `< stdout grep -c 'Hello' ` == 1 ]] || false

View File

@@ -0,0 +1,20 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `< .nextflow.log grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `< stdout grep -c 'Hello' ` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `< .nextflow.log grep -c 'Cached process > foo'` == 1 ]] || false
[[ `< stdout grep -c 'Hello' ` == 1 ]] || false

View File

@@ -0,0 +1,25 @@
set -e
#
# run normal mode
#
echo ''
echo \$ $NXF_RUN
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > split'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > printTwo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > printLast'` == 2 ]] || false
#
# RESUME mode
#
echo ''
echo \$ $NXF_RUN -resume
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > split'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > printTwo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > printLast'` == 2 ]] || false

View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Skip test if AWS keys are missing
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Missing AWS credentials -- Skipping test"
exit 0
fi
OUTDIR="s3://nextflow-ci/work/ci-test/fusion-symlink/$(uuidgen)"
#
# normal run
#
echo initial run
$NXF_RUN -c .config --outdir "$OUTDIR"
$NXF_CMD fs cp "$OUTDIR/data.txt" data.txt
cmp data.txt .expected || false
#
# resume run
#
echo resumed run
$NXF_RUN -c .config --outdir "$OUTDIR" -resume
$NXF_CMD fs cp "$OUTDIR/data.txt" data.txt
cmp data.txt .expected || false

View File

@@ -0,0 +1,5 @@
workDir = 's3://nextflow-ci/work'
fusion.enabled = true
fusion.exportStorageCredentials = true
wave.enabled = true
docker.runOptions = '-e FUSION_TRACING_DESTINATION=objectstore://'

View File

@@ -0,0 +1 @@
HELLO

View File

@@ -0,0 +1,27 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > recurseDir'` == 1 ]] || false
grep 'result1: file2.fa' stdout
grep 'result1: file3.fa' stdout
grep 'result1: file4.fa' stdout
grep 'result2: file5.txt' stdout
#
# run resume mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > recurseDir'` == 1 ]] || false
grep 'result1: file2.fa' stdout
grep 'result1: file3.fa' stdout
grep 'result1: file4.fa' stdout
grep 'result2: file5.txt' stdout

View File

@@ -0,0 +1,31 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > sayhello'` == 1 ]] || false
[[ `grep -c 'Hello world!' stdout` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > sayhello'` == 1 ]] || false
[[ `grep -c 'Hello world!' stdout` == 1 ]] || false
#
# checks reports
#
echo ''
$NXF_RUN -with-report -with-timeline -with-trace -with-dag | tee stdout
[ -s report-*.html ] || false
[ -s timeline-*.html ] || false
[ -s trace-*.txt ] || false
[ -s dag-*.html ] || false

View File

@@ -0,0 +1,28 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 2 ]] || false
[[ `grep -c '1 - a' stdout` == 1 ]] || false
[[ `grep -c '1 - b' stdout` == 1 ]] || false
[[ `grep -c 'foo out: a' stdout` == 1 ]] || false
[[ `grep -c 'foo out: b' stdout` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 2 ]] || false
[[ `grep -c '1 - a' stdout` == 1 ]] || false
[[ `grep -c '1 - b' stdout` == 1 ]] || false
[[ `grep -c 'foo out: a' stdout` == 1 ]] || false
[[ `grep -c 'foo out: b' stdout` == 1 ]] || false

View File

@@ -0,0 +1,21 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > perlTask'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > pyTask'` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > perlTask'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > pyTask'` == 1 ]] || false

View File

@@ -0,0 +1 @@
avg: 43.5159945284 - 36.8211561596

View File

@@ -0,0 +1,20 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > nativeCode'` == 1 ]] || false
grep 'Hello world' stdout
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > nativeCode'` == 1 ]] || false
grep 'Hello world' stdout

View File

@@ -0,0 +1,18 @@
set +e
#
# run normal mode
#
echo ''
$NXF_RUN | tee .stdout
[[ $? == 0 ]] || false
cmp .expected .stdout || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee .stdout
[[ $? == 0 ]] || false
cmp .expected .stdout || false

View File

@@ -0,0 +1,2 @@
empty input

View File

@@ -0,0 +1,18 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `< .nextflow.log grep -c 'Submitted process > foo'` == 1 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `< .nextflow.log grep -c 'Cached process > foo'` == 1 ]] || false

View File

@@ -0,0 +1,102 @@
echo "Initial run"
$NXF_RUN --save_bam_bai | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > fastqc') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > align') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > quant') == 3 ]] || false
sed "s|"$(dirname "$(realpath "$0")")"||g" stdout > stdout.norm
cmp .expected-text stdout.norm || false
[[ -f results/log/sample1.fastqc.log ]] || false
[[ -f results/log/sample2.fastqc.log ]] || false
[[ -f results/log/sample3.fastqc.log ]] || false
[[ -f results/align/sample1.bai ]] || false
[[ -f results/align/sample1.bam ]] || false
[[ -f results/align/sample2.bai ]] || false
[[ -f results/align/sample2.bam ]] || false
[[ -f results/align/sample3.bai ]] || false
[[ -f results/align/sample3.bam ]] || false
[[ -L results/quant/sample1 ]] || false
[[ -L results/quant/sample2 ]] || false
[[ -L results/quant/sample3 ]] || false
[[ -f results/samples.csv ]] || false
[[ -f results/summary_report.html ]] || false
[[ -f results/summary_data/data.json ]] || false
[[ -f results/summary_data/fastqc.txt ]] || false
echo "Run again with overwrite enabled and JSON output"
$NXF_RUN -output-format json --save_bam_bai | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > fastqc') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > align') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process > quant') == 3 ]] || false
sed "s|"$(dirname "$(realpath "$0")")"||g" stdout > stdout.norm
cmp .expected-json stdout.norm || false
[[ -f results/log/sample1.fastqc.log ]] || false
[[ -f results/log/sample2.fastqc.log ]] || false
[[ -f results/log/sample3.fastqc.log ]] || false
[[ -f results/align/sample1.bai ]] || false
[[ -f results/align/sample1.bam ]] || false
[[ -f results/align/sample2.bai ]] || false
[[ -f results/align/sample2.bam ]] || false
[[ -f results/align/sample3.bai ]] || false
[[ -f results/align/sample3.bam ]] || false
[[ -L results/quant/sample1 ]] || false
[[ -L results/quant/sample2 ]] || false
[[ -L results/quant/sample3 ]] || false
[[ -f results/samples.csv ]] || false
[[ -f results/summary_report.html ]] || false
[[ -f results/summary_data/data.json ]] || false
[[ -f results/summary_data/fastqc.txt ]] || false
echo "Run with some outputs disabled"
rm -rf results
$NXF_RUN -resume | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > fastqc') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > align') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > quant') == 3 ]] || false
[[ -f results/log/sample1.fastqc.log ]] || false
[[ -f results/log/sample2.fastqc.log ]] || false
[[ -f results/log/sample3.fastqc.log ]] || false
[[ ! -e results/align ]] || false
[[ -L results/quant/sample1 ]] || false
[[ -L results/quant/sample2 ]] || false
[[ -L results/quant/sample3 ]] || false
[[ -f results/samples.csv ]] || false
[[ -f results/summary_report.html ]] || false
[[ -f results/summary_data/data.json ]] || false
[[ -f results/summary_data/fastqc.txt ]] || false
echo "Resumed run"
rm -rf results
$NXF_RUN --save_bam_bai -resume | tee stdout
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > fastqc') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > align') == 3 ]] || false
[[ $(grep INFO .nextflow.log | grep -c 'Cached process > quant') == 3 ]] || false
[[ -f results/log/sample1.fastqc.log ]] || false
[[ -f results/log/sample2.fastqc.log ]] || false
[[ -f results/log/sample3.fastqc.log ]] || false
[[ -f results/align/sample1.bai ]] || false
[[ -f results/align/sample1.bam ]] || false
[[ -f results/align/sample2.bai ]] || false
[[ -f results/align/sample2.bam ]] || false
[[ -f results/align/sample3.bai ]] || false
[[ -f results/align/sample3.bam ]] || false
[[ -L results/quant/sample1 ]] || false
[[ -L results/quant/sample2 ]] || false
[[ -L results/quant/sample3 ]] || false
[[ -f results/samples.csv ]] || false
[[ -f results/summary_report.html ]] || false
[[ -f results/summary_data/data.json ]] || false
[[ -f results/summary_data/fastqc.txt ]] || false

View File

@@ -0,0 +1,8 @@
{
"samples": "/results/samples.csv",
"summary": {
"report": "/results/summary_report.html",
"data": "/results/summary_data/data.json",
"fastqc": "/results/summary_data/fastqc.txt"
}
}

View File

@@ -0,0 +1,11 @@
Outputs:
/results
samples: samples.csv
summary:
report: summary_report.html
data: summary_data/data.json
fastqc: summary_data/fastqc.txt

View File

@@ -0,0 +1,25 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `< stdout grep 'dummy'` ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 1 ]] || false
[[ `< stdout grep 'dummy'` ]] || false

View File

@@ -0,0 +1,28 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > bar'` == 1 ]] || false
[[ `< stdout grep -E 'foo.*/a/a/2\.txt' ` ]] || false
[[ `< stdout grep -E 'bar.*/a/a/2\.txt' ` ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > bar'` == 1 ]] || false
[[ `< stdout grep -E 'foo.*/a/a/2\.txt' ` ]] || false
[[ `< stdout grep -E 'bar.*/a/a/2\.txt' ` ]] || false

View File

@@ -0,0 +1,18 @@
set -e
#
# run normal mode
#
$NXF_RUN -process.scratch true | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
#
# run resume mode
#
$NXF_RUN -resume -process.scratch true | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false

View File

@@ -0,0 +1,30 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ `< stdout grep 'x: 100'` ]] || false
[[ `< stdout grep 'y: two hundred'` ]] || false
[[ `< stdout grep 'str: Hello'` ]] || false
[[ `< stdout grep 'exp: prot-100.out'` ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 1 ]] || false
[[ `< stdout grep 'x: 100'` ]] || false
[[ `< stdout grep 'y: two hundred'` ]] || false
[[ `< stdout grep 'str: Hello'` ]] || false
[[ `< stdout grep 'exp: prot-100.out'` ]] || false

View File

@@ -0,0 +1,48 @@
echo "Test successful run"
echo
$NXF_RUN --input ./data > stdout
< stdout grep -F 'params.input = [./data]'
< stdout grep -F 'params.save_intermeds = false'
< stdout grep -F 'params.method = auto'
echo
echo "Test missing required param"
echo
set +e
$NXF_RUN &> stdout ; ret=$?
set -e
[[ $ret != 0 ]] || false
< stdout grep -F 'Parameter `input` is required'
echo
echo "Test overwrite script param from command line"
echo
$NXF_RUN -c ../../params-dsl.config --input 'alpha,beta' --save_intermeds --method special > stdout
< stdout grep -F 'params.input = [alpha, beta]'
< stdout grep -F 'params.save_intermeds = true'
< stdout grep -F 'params.method = special'
echo
echo "Test overwrite script param from config profile"
echo
$NXF_RUN -c ../../params-dsl.config -profile test > stdout
< stdout grep -F 'params.input = [alpha, beta, delta]'
< stdout grep -F 'params.save_intermeds = true'
< stdout grep -F 'params.method = special'
echo
echo "Test invalid param"
echo
set +e
$NXF_RUN --inputs ./data &> stdout ; ret=$?
set -e
[[ $ret != 0 ]] || false
< stdout grep -F 'Parameter `inputs` was specified'

View File

@@ -0,0 +1,14 @@
set -e
#
# run normal mode
#
echo ''
NXF_PLUGINS_REGISTRY_URL=https://plugin-registry.dev-tower.net/api NXF_PLUGINS_DIR=$PWD/.nextflow/plugins/ $NXF_RUN -plugins nf-ci-integration-test@0.1.0 | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Downloading plugin nf-ci-integration-test@0.1.0'` == 1 ]] || false
[[ `grep -c 'Pipeline is starting using nf-ci-test-integration plugin' stdout` == 1 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > sayhello'` == 1 ]] || false
[[ `grep -c 'Hello world!' stdout` == 1 ]] || false
[[ `grep -c 'Pipeline completed using nf-ci-test-integration plugin' stdout` == 1 ]] || false

View File

@@ -0,0 +1,4 @@
$NXF_RUN | tee stdout
[[ `< stdout grep -c 'User-agent'` != 0 ]] || false
[[ `< stdout grep -c 'Disallow'` != 0 ]] || false

View File

@@ -0,0 +1,16 @@
set +e
#
# run normal mode
#
echo ''
$NXF_RUN
[[ $? == 0 ]] || false
#
# RESUME mode
#
echo ''
$NXF_RUN -resume
[[ $? == 0 ]] || false

View File

@@ -0,0 +1,34 @@
set -e
#
# Test single process auto-execution with parameter mapping
#
echo ''
echo '=== Testing single process auto-execution ==='
$NXF_RUN --sampleId "SAMPLE_001" --dataFile "../../data/sample_data.txt" --threads "4" | tee stdout
# Check that the process executed successfully
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > analyzeData'` == 1 ]] || false
# Check that all parameters were properly mapped and used
[[ `grep -c 'Single process execution test' stdout` == 1 ]] || false
[[ `grep -c 'Sample ID: SAMPLE_001' stdout` == 1 ]] || false
[[ `grep -c 'Data file: sample_data.txt' stdout` == 1 ]] || false
[[ `grep -c 'Threads: 4' stdout` == 1 ]] || false
[[ `grep -c 'Processing file with 4 threads' stdout` == 1 ]] || false
[[ `grep -c 'Analysis completed for sample SAMPLE_001' stdout` == 1 ]] || false
# Check that file processing worked (5 lines in sample_data.txt)
[[ `grep -c '5 sample_data.txt' stdout` == 1 ]] || false
#
# Test with relative path
#
echo ''
echo '=== Testing single process with relative path ==='
rm -f .nextflow.log # Clear log for clean test
$NXF_RUN --sampleId "REL_TEST" --dataFile "../../data/sample_data.txt" --threads "2" | tee stdout2
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > analyzeData'` == 1 ]] || false
[[ `grep -c 'Sample ID: REL_TEST' stdout2` == 1 ]] || false
[[ `grep -c 'Threads: 2' stdout2` == 1 ]] || false

View File

@@ -0,0 +1,43 @@
#
# verify default profile
#
$NXF_CMD -C ../../profiles.config config | tee stdout
cmp stdout .expected_profile_standard.txt || false
#
# verify advanced profile
#
$NXF_CMD -C ../../profiles.config config -profile advanced | tee stdout
cmp stdout .expected_profile_advanced.txt || false
#
# verify *all* profile
#
$NXF_CMD -C ../../profiles.config config -a | tee stdout
cmp stdout .expected_profile_all.txt || false
#
# verify return error
#
$NXF_CMD -C ../../profiles.config config -profile xxx 2>&1| tee stdout
[[ ${PIPESTATUS[0]} == 0 ]] && exit 1
< stdout grep "Unknown configuration profile: 'xxx'" || false
#
# Verify run uses the default profile
#
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT | tee stdout
< stdout grep "cpus: 2 memory: 2 GB" || false
#
# Verify run uses the *advanced* profile
#
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT -profile advanced | tee stdout
< stdout grep "cpus: 8 memory: 10 GB" || false
#
# Verify that return an error code
#
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT -profile foo 2>&1| tee stdout
[[ ${PIPESTATUS[0]} == 0 ]] && exit 1
< stdout grep "Unknown configuration profile: 'foo'" || false

View File

@@ -0,0 +1,7 @@
outputDir = 'results'
process {
cpus = 8
memory = '10GB'
disk = '300GB'
}

View File

@@ -0,0 +1,17 @@
outputDir = 'results'
profiles {
standard {
process {
cpus = 2
memory = '2GB'
}
}
advanced {
process {
cpus = 8
memory = '10GB'
disk = '300GB'
}
}
}

View File

@@ -0,0 +1,6 @@
outputDir = 'results'
process {
cpus = 2
memory = '2GB'
}

View File

@@ -0,0 +1,10 @@
$NXF_RUN | tee stdout
[[ `< stdout grep -c 'exit_status=0'` != 0 ]] || false
[[ `< stdout grep -c 'record=aaa_bbb'` != 0 ]] || false
$NXF_RUN -resume | tee stdout
[[ `< stdout grep -c 'exit_status=0'` != 0 ]] || false
[[ `< stdout grep -c 'record=aaa_bbb'` != 0 ]] || false

View File

@@ -0,0 +1,73 @@
#
# run normal mode
#
echo First run
$NXF_RUN | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > my_combine'` == 1 ]] || false
cmp stdout .expected || false
[[ -f data/alpha.bai ]] || false
[[ -f data/alpha.bam ]] || false
[[ -f data/beta.bai ]] || false
[[ -f data/beta.bam ]] || false
[[ -f data/delta.bai ]] || false
[[ -f data/delta.bam ]] || false
[[ -L data/result.txt ]] || false
[[ -f more/data/result.txt ]] || false
[[ -f data/xxx/A ]] || false
[[ -f data/xxx/B ]] || false
[[ -f data/xxx/C ]] || false
#
# one more time to make sure 'overwrite' is fine
#
echo Second run
$NXF_RUN | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > my_combine'` == 1 ]] || false
cmp stdout .expected || false
[[ -f data/alpha.bai ]] || false
[[ -f data/alpha.bam ]] || false
[[ -f data/beta.bai ]] || false
[[ -f data/beta.bam ]] || false
[[ -f data/delta.bai ]] || false
[[ -f data/delta.bam ]] || false
[[ -L data/result.txt ]] || false
[[ -f more/data/result.txt ]] || false
[[ -f data/xxx/A ]] || false
[[ -f data/xxx/B ]] || false
[[ -f data/xxx/C ]] || false
#
# clean & run resume mode
#
echo Third run
rm -rf data
rm -rf more/data
$NXF_RUN -resume | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > my_combine'` == 1 ]] || false
cmp stdout .expected || false
[[ -f data/alpha.bai ]] || false
[[ -f data/alpha.bam ]] || false
[[ -f data/beta.bai ]] || false
[[ -f data/beta.bam ]] || false
[[ -f data/delta.bai ]] || false
[[ -f data/delta.bam ]] || false
[[ -L data/result.txt ]] || false
[[ -f more/data/result.txt ]] || false
#
# NOTE: on Mac when deleting an hard-link also the origin is removed
#
[[ -f data/xxx/A ]] || false
[[ -f data/xxx/B ]] || false
[[ -f data/xxx/C ]] || false

View File

@@ -0,0 +1,7 @@
alpha
beta
delta
ahpla
ateb
atled

View File

@@ -0,0 +1,20 @@
#
# run normal mode
#
echo First run
$NXF_RUN --x ciao | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ $(cat data/a/b/c/file.txt) == ciao ]] || false
#
# second run, must overwrite the file
#
echo First run
$NXF_RUN --x miao | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
[[ $(cat data/a/b/c/file.txt) == miao ]] || false

View File

@@ -0,0 +1,30 @@
#!/bin/bash
BUCKET="nf-kms-xyz"
PREFIX="work/ci-test/publish-s3/$(uuidgen)"
OUTDIR="s3://$BUCKET/$PREFIX"
function check_kms_key() {
aws s3api head-object --bucket "$BUCKET" --key "$PREFIX/HELLO.tsv" | grep -c e5109f93-b42d-4c26-89ee-8b251029a41d
}
# Skip test if AWS keys are missing
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Missing AWS credentials -- Skipping test"
exit 0
fi
#
# run normal mode
#
$NXF_RUN -c .config --outdir "$OUTDIR" | tee .stdout
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process') == 1 ]] || false
[[ $(check_kms_key) == 1 ]] || false
#
# run resume mode
#
$NXF_RUN -c .config --outdir "$OUTDIR" -resume | tee .stdout
[[ $(grep INFO .nextflow.log | grep -c 'Cached process') == 1 ]] || false
[[ $(check_kms_key) == 1 ]] || false

View File

@@ -0,0 +1,2 @@
aws.client.storageEncryption = 'aws:kms'
aws.client.storageKmsKeyId = 'arn:aws:kms:eu-west-1:195996028523:key/e5109f93-b42d-4c26-89ee-8b251029a41d'

View File

@@ -0,0 +1,24 @@
function count_hello() {
rm -rf hello
aws s3 cp --only-show-errors s3://nextflow-ci/work/ci-test/publish-s3/HELLO.tsv hello && < hello grep 'Hello, world' -c
}
# Skip test if AWS keys are missing
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Missing AWS credentials -- Skipping test"
exit 0
fi
#
# run normal mode
#
$NXF_RUN | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
#
# run resume mode
#
$NXF_RUN -resume | tee .stdout
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false

View File

@@ -0,0 +1,11 @@
echo First run
$NXF_RUN | tee stdout
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 3 ]] || false
[[ -f results/alpha/file_1.txt ]] || false
[[ -f results/gamma/file_3.txt ]] || false
[[ ! -f results/file_2.txt ]] || false
[[ ! -f results/alpha/file_2.txt ]] || false
[[ ! -f results/gamma/file_2.txt ]] || false

7
nextflow/tests/checks/qrun.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
launch_cmd=../../launch.sh
export NXF_ANSI_LOG=false
export WITH_DOCKER=${WITH_DOCKER:=''}
export NXF_CMD=$(realpath $launch_cmd)
export TEST_JDK=17
bash run.sh "$1"

View File

@@ -0,0 +1,24 @@
#
# run normal mode
#
$NXF_RUN
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc1'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc2'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc3'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc4'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc5'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc6'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc7'` == 3 ]] || false
$NXF_RUN
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc1'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc2'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc3'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc4'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc5'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc6'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc7'` == 3 ]] || false

View File

@@ -0,0 +1,58 @@
set -e
#
# run normal mode
#
echo ''
$NXF_RUN | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > hola'` == 12 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 2 ]] || false
grep 'x: 1; y: Ciao; z: alpha' stdout
grep 'x: 1; y: Ciao; z: beta' stdout
grep 'x: 1; y: Ciao; z: delta' stdout
grep 'x: 1; y: Hola; z: alpha' stdout
grep 'x: 1; y: Hola; z: beta' stdout
grep 'x: 1; y: Hola; z: delta' stdout
grep 'x: 2; y: Ciao; z: alpha' stdout
grep 'x: 2; y: Ciao; z: beta' stdout
grep 'x: 2; y: Ciao; z: delta' stdout
grep 'x: 2; y: Hola; z: alpha' stdout
grep 'x: 2; y: Hola; z: beta' stdout
grep 'x: 2; y: Hola; z: delta' stdout
grep -F 'foo [a, b]' stdout
grep -F 'foo [c, d]' stdout
#
# RESUME mode
#
echo ''
$NXF_RUN -resume | tee stdout
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > hola'` == 12 ]] || false
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 2 ]] || false
grep 'x: 1; y: Ciao; z: alpha' stdout
grep 'x: 1; y: Ciao; z: beta' stdout
grep 'x: 1; y: Ciao; z: delta' stdout
grep 'x: 1; y: Hola; z: alpha' stdout
grep 'x: 1; y: Hola; z: beta' stdout
grep 'x: 1; y: Hola; z: delta' stdout
grep 'x: 2; y: Ciao; z: alpha' stdout
grep 'x: 2; y: Ciao; z: beta' stdout
grep 'x: 2; y: Ciao; z: delta' stdout
grep 'x: 2; y: Hola; z: alpha' stdout
grep 'x: 2; y: Hola; z: beta' stdout
grep 'x: 2; y: Hola; z: delta' stdout
grep -F 'foo [a, b]' stdout
grep -F 'foo [c, d]' stdout

Some files were not shown because too many files have changed in this diff Show More