add nextflow d30e48d
This commit is contained in:
8
nextflow/tests/.gitignore
vendored
Normal file
8
nextflow/tests/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
.cache
|
||||
.nextflow.*
|
||||
results
|
||||
scratch
|
||||
work
|
||||
**/checks.out
|
||||
**/.stdout
|
||||
**/stdout
|
||||
42
nextflow/tests/Dockerfile
Normal file
42
nextflow/tests/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
FROM pditommaso/dkrbase:1.2
|
||||
|
||||
MAINTAINER Paolo Di Tommaso <paolo.ditommaso@gmail.com>
|
||||
|
||||
RUN apt-get update -y && apt-get install -q -y gnuplot python && apt-get clean
|
||||
|
||||
#
|
||||
# Required PERL modules
|
||||
#
|
||||
RUN cpanm Math::CDF Math::Round && \
|
||||
rm -rf /root/.cpanm/work/
|
||||
|
||||
|
||||
#
|
||||
# BLAST
|
||||
#
|
||||
RUN wget -q ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.29/ncbi-blast-2.2.29+-x64-linux.tar.gz && \
|
||||
tar xf ncbi-blast-2.2.29+-x64-linux.tar.gz && \
|
||||
mv ncbi-blast-2.2.29+ /opt/ && \
|
||||
rm -rf ncbi-blast-2.2.29+-x64-linux.tar.gz && \
|
||||
ln -s /opt/ncbi-blast-2.2.29+/ /opt/blast
|
||||
|
||||
#
|
||||
# install T-Coffee
|
||||
#
|
||||
RUN wget -q http://tcoffee.org/Packages/Stable/Version_11.00.8cbe486/linux/T-COFFEE_installer_Version_11.00.8cbe486_linux_x64.tar.gz && \
|
||||
tar xf T-COFFEE_installer_Version_11.00.8cbe486_linux_x64.tar.gz -C /opt && \
|
||||
mv /opt/T-COFFEE_installer_Version_11.00.8cbe486_linux_x64 /opt/tcoffee && \
|
||||
rm -rf /opt/tcoffee/plugins/linux/* && \
|
||||
rm T-COFFEE_installer_Version_11.00.8cbe486_linux_x64.tar.gz
|
||||
|
||||
#
|
||||
# Add AMPA script to bin folder
|
||||
#
|
||||
ADD bin/AMPA.pl /usr/local/bin/
|
||||
|
||||
|
||||
#
|
||||
# Configure the env
|
||||
#
|
||||
ENV PATH="$PATH:/opt/ncbi-blast-2.2.29+/bin:/opt/tcoffee/bin"
|
||||
|
||||
5
nextflow/tests/README.md
Normal file
5
nextflow/tests/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Nextflow tests
|
||||
|
||||
This repository contains the integration tests for Nextflow.
|
||||
|
||||

|
||||
20
nextflow/tests/agent-output-error.nf
Normal file
20
nextflow/tests/agent-output-error.nf
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env nextflow
|
||||
workflow {
|
||||
FAIL()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Test for agent output mode error handling (NXF_AGENT_MODE=true)
|
||||
*
|
||||
* This test verifies the error output format in agent mode.
|
||||
* Run with: NXF_AGENT_MODE=true nextflow run agent-output-error.nf
|
||||
*/
|
||||
|
||||
process FAIL {
|
||||
script:
|
||||
"""
|
||||
echo "Error message here" >&2
|
||||
exit 127
|
||||
"""
|
||||
}
|
||||
35
nextflow/tests/agent-output.nf
Normal file
35
nextflow/tests/agent-output.nf
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env nextflow
|
||||
workflow {
|
||||
HELLO | WORLD | view
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Test for agent output mode (NXF_AGENT_MODE=true)
|
||||
*
|
||||
* This test verifies the minimal agent-friendly output format.
|
||||
* Run with: NXF_AGENT_MODE=true nextflow run agent-output.nf
|
||||
*/
|
||||
|
||||
process HELLO {
|
||||
output:
|
||||
stdout
|
||||
|
||||
script:
|
||||
"""
|
||||
echo "Hello from agent mode"
|
||||
"""
|
||||
}
|
||||
|
||||
process WORLD {
|
||||
input:
|
||||
val msg
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
script:
|
||||
"""
|
||||
echo "World received: ${msg}"
|
||||
"""
|
||||
}
|
||||
32
nextflow/tests/ampa.nf
Normal file
32
nextflow/tests/ampa.nf
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.in = "$baseDir/data/sample.fa"
|
||||
|
||||
|
||||
/*
|
||||
* For each sequence that is sent over the 'seq' channel
|
||||
* the below task is executed
|
||||
*/
|
||||
process ampaTask {
|
||||
|
||||
input:
|
||||
path seq
|
||||
|
||||
output:
|
||||
path 'result'
|
||||
|
||||
// The BASH script to be executed - for each - sequence
|
||||
script:
|
||||
"""
|
||||
AMPA.pl -in=${seq} -noplot -rf=result -df=data
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
workflow {
|
||||
channel.fromPath(params.in) |
|
||||
splitFasta(file:true) |
|
||||
ampaTask |
|
||||
view { it.text }
|
||||
}
|
||||
|
||||
48
nextflow/tests/basic.nf
Normal file
48
nextflow/tests/basic.nf
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
/*
|
||||
* Command line input parameter
|
||||
*/
|
||||
params.in = "$baseDir/data/sample.fa"
|
||||
|
||||
|
||||
/*
|
||||
* split a fasta file in multiple files
|
||||
*/
|
||||
process splitSequences {
|
||||
|
||||
input:
|
||||
path 'input.fa'
|
||||
|
||||
output:
|
||||
path 'seq_*'
|
||||
|
||||
script:
|
||||
"""
|
||||
awk '/^>/{f="seq_"++d} {print > f}' < input.fa
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple reverse the sequences
|
||||
*/
|
||||
process reverse {
|
||||
|
||||
input:
|
||||
path x
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
script:
|
||||
"""
|
||||
cat $x | rev
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
splitSequences(params.in) | reverse | view
|
||||
}
|
||||
|
||||
334
nextflow/tests/bin/AMPA.pl
Executable file
334
nextflow/tests/bin/AMPA.pl
Executable file
@@ -0,0 +1,334 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use Math::CDF;
|
||||
use Math::Round;
|
||||
|
||||
#
|
||||
# The default input parameters
|
||||
#
|
||||
my $debug = 0;
|
||||
my $noplot = 0;
|
||||
my $gnuplot = "";
|
||||
my $input_file = "protein.txt";
|
||||
my $window_size = 7;
|
||||
my $threshold = 0.225;
|
||||
my $graph_file = "";
|
||||
my $result_file = "results.$$";
|
||||
my $data_file = "sliding.$$";
|
||||
my $_prompt = "";
|
||||
|
||||
#
|
||||
# Find out gnuplot
|
||||
#
|
||||
|
||||
if( exists $ENV{GNUPLOT_BIN}) {
|
||||
$gnuplot = $ENV{GNUPLOT_BIN};
|
||||
}
|
||||
if( $gnuplot eq "" ) {
|
||||
$gnuplot = `which gnuplot`;
|
||||
chomp($gnuplot);
|
||||
}
|
||||
if( $gnuplot eq "" ) {
|
||||
print "AMPA requires gnuplot to be installed on your system.";
|
||||
exit 2;
|
||||
}
|
||||
|
||||
#
|
||||
# Parse the command
|
||||
#
|
||||
|
||||
my $cl=join( " ", @ARGV);
|
||||
|
||||
if (($cl=~/-h/) ||($cl=~/-H/) ) {
|
||||
# print usage
|
||||
print "Usage: AMPA.pl -in=<input fasta file> [other options]\n";
|
||||
print "\n";
|
||||
print "Available options:\n";
|
||||
print "-in Fasta sequence input file\n";
|
||||
print "-t Threshold value (default: 7)\n";
|
||||
print "-w Window size value (default: 0.225)\n";
|
||||
print "-rf File where store the program result\n";
|
||||
print "-df File where store the produced plot data\n";
|
||||
print "-gf File where store the generated plot\n";
|
||||
print "-noplot Skip plot creation step\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
#
|
||||
# If not command line is provided switch to interactive mode
|
||||
#
|
||||
|
||||
if ($#ARGV==-1 ) {
|
||||
# the input file name
|
||||
print "Enter the name of the sequence file and then press Enter [$input_file]: ";
|
||||
$_prompt = <STDIN>;
|
||||
chomp($_prompt);
|
||||
if( $_prompt ne "" ) { $input_file=$_prompt };
|
||||
|
||||
# the window size
|
||||
print "Enter the desired window size as an odd number and then press Enter [$window_size]: ";
|
||||
$_prompt = <STDIN>;
|
||||
chomp($_prompt);
|
||||
if( $_prompt ne "" ) { $window_size = $_prompt };
|
||||
|
||||
# the threshold
|
||||
print "Enter the desired threshold and then press Enter [$threshold]: ";
|
||||
$_prompt = <STDIN>;
|
||||
chomp($_prompt);
|
||||
if( $_prompt ne "" ) { $threshold = $_prompt };
|
||||
}
|
||||
|
||||
|
||||
# option '-in': input file name
|
||||
if ( ($cl=~/-in=\s*(\S+)/)) {
|
||||
$input_file = $1;
|
||||
}
|
||||
|
||||
# option '-w': window size
|
||||
if ( ($cl =~ /-w=\s*(\S+)/)) {
|
||||
$window_size = $1;
|
||||
}
|
||||
|
||||
# option '-t': threshold value
|
||||
if ( ($cl =~ /-t=\s*(\S+)/)) {
|
||||
$threshold = $1;
|
||||
}
|
||||
|
||||
# option '-gf': output graph file
|
||||
if ( ($cl =~ /-gf=\s*(\S+)/)) {
|
||||
$graph_file = $1;
|
||||
}
|
||||
|
||||
# option '-rf': output result file
|
||||
if ( ($cl =~ /-rf=\s*(\S+)/)) {
|
||||
$result_file = $1;
|
||||
}
|
||||
|
||||
# option '-df': output sliding file
|
||||
if ( ($cl =~ /-df=\s*(\S+)/)) {
|
||||
$data_file = $1;
|
||||
}
|
||||
|
||||
# option '-debug': enable debug mode
|
||||
if ( ($cl =~ /-debug/)) {
|
||||
$debug = 1;
|
||||
}
|
||||
|
||||
# option '-noplot': threshold value
|
||||
if ( ($cl =~ /-noplot/)) {
|
||||
$noplot = 1;
|
||||
}
|
||||
|
||||
if( $debug != 0 ) {
|
||||
print "Window size : $window_size\n";
|
||||
print "Threshold value : $threshold\n";
|
||||
print "Input file name : $input_file\n";
|
||||
print "Graph file name : $graph_file\n";
|
||||
print "Result file name : $result_file\n";
|
||||
print "Data file name : $data_file\n";
|
||||
print "Gnuplot bin : $gnuplot\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Main script start here
|
||||
#
|
||||
|
||||
my(@names,@lengths,@sequences,$sequence_number,$protein);
|
||||
|
||||
open(PROTEIN, "$input_file") or die "Cannot open '$input_file': $!\n";
|
||||
|
||||
#The program should read the user input sequence
|
||||
|
||||
$/ = ">";
|
||||
|
||||
for(my $c=1; $c<(($window_size + 1)/2); $c++) {
|
||||
push (@sequences, 'X');
|
||||
}
|
||||
|
||||
while (my $sequence_record = <PROTEIN>) {
|
||||
if ($sequence_record eq ">") {
|
||||
next;
|
||||
}
|
||||
|
||||
my $sequence_name = "";
|
||||
if ($sequence_record =~ m/([^\n]+)/) {
|
||||
$sequence_name = $1;
|
||||
} else {
|
||||
$sequence_name = "No title was found!";
|
||||
}
|
||||
|
||||
$sequence_record =~ s/[^\n]+//;
|
||||
push (@names, $sequence_name);
|
||||
$sequence_record =~ s/[^ACDEFGHIKLMNPQRSTVWYacdefghiklmnpqrstvwy]//g;
|
||||
push (@sequences, $sequence_record);
|
||||
push (@lengths, length($sequence_record));
|
||||
my $sequence_length = length($sequence_record);
|
||||
}
|
||||
|
||||
for(my $c=1; $c<(($window_size + 1)/2); $c++) {
|
||||
push (@sequences, 'X');
|
||||
}
|
||||
|
||||
my $sequences = join("",@sequences);
|
||||
|
||||
close(PROTEIN) or die "Cannot close the file: $!\n";
|
||||
|
||||
#The program calls the subroutines to analyze the sequence
|
||||
|
||||
&sliding($sequences);
|
||||
if(!$noplot) {
|
||||
&gnuplot_sld();
|
||||
}
|
||||
|
||||
### Subroutines
|
||||
|
||||
# Defines the value at the window center (window_size+1)/2
|
||||
|
||||
sub sliding {
|
||||
open(KD,">$data_file") or die("Could not open '$data_file': $!\n");
|
||||
open(RS,">$result_file") or die("Could not open '$result_file': $!\n");
|
||||
my($center,$length);
|
||||
my $half = (($window_size + 1)/2);
|
||||
|
||||
# These are the antimicrobial propensity values for each amino acid
|
||||
|
||||
my %sliding = (
|
||||
'A', 0.307,
|
||||
'R', 0.106,
|
||||
'N', 0.240,
|
||||
'D', 0.479,
|
||||
'C', 0.165,
|
||||
'Q', 0.248,
|
||||
'E', 0.449,
|
||||
'G', 0.265,
|
||||
'H', 0.202,
|
||||
'I', 0.198,
|
||||
'L', 0.246,
|
||||
'K', 0.111,
|
||||
'M', 0.265,
|
||||
'F', 0.246,
|
||||
'P', 0.327,
|
||||
'S', 0.281,
|
||||
'T', 0.242,
|
||||
'W', 0.172,
|
||||
'Y', 0.185,
|
||||
'V', 0.200,
|
||||
'X', $threshold
|
||||
);
|
||||
|
||||
$protein = shift;
|
||||
|
||||
print KD "# The window size is currently set at $window_size.\n";
|
||||
print KD "# Here are the AMSI values for this protein:\n";
|
||||
print KD "# $names[0]\n";
|
||||
print KD "# Pos\ APV\n";
|
||||
print KD "# ---\t-------------------\n";
|
||||
|
||||
my $acc1=0;
|
||||
my $acc2=0;
|
||||
my $bacindex=0;
|
||||
my $amvalue=0;
|
||||
my $bacvalue=0;
|
||||
my $prob=0;
|
||||
|
||||
for(my $i=0;$i<=(length($protein)-$window_size);$i++) {
|
||||
my $window = substr($protein, $i, $window_size);
|
||||
my $sum=0;
|
||||
for(my $j=0; $j<$window_size; $j++) {
|
||||
my $PV = 0;
|
||||
my $residue = substr($window, $j, 1);
|
||||
$PV = $sliding{$residue};
|
||||
$sum+=$PV;
|
||||
}
|
||||
|
||||
$center = $i + $half;
|
||||
my $position = $center - 3;
|
||||
my $APV=$sum/$window_size;
|
||||
$APV = sprintf "%.3f", $APV;
|
||||
print KD "$position\t$APV\n";
|
||||
$amvalue=$amvalue+$APV;
|
||||
|
||||
if($acc1==3) {
|
||||
if($acc2>=10){
|
||||
my $init=$position-$acc2-2;
|
||||
my $last=$position-1;
|
||||
my $bacvalue=(($bacvalue)/($last-$init+1));
|
||||
$prob = &Math::CDF::pnorm(($bacvalue-0.2584)/0.02479);
|
||||
$prob*=100;
|
||||
my $rbacvalue = nearest(.001, $bacvalue);
|
||||
my $rprob = nearest(1, $prob);
|
||||
print RS "Antimicrobial stretch found in $init to $last. Propensity value $rbacvalue ($rprob %) \n";
|
||||
$bacindex++;
|
||||
$acc2=0;
|
||||
$acc1=0;
|
||||
$bacvalue=0;
|
||||
$prob=0;
|
||||
}
|
||||
if($acc2<10){
|
||||
$acc1=0;
|
||||
$acc2=0;
|
||||
$bacvalue=0;
|
||||
}
|
||||
}
|
||||
if($acc1!=3){
|
||||
if($acc2==0) {
|
||||
$acc1=0;
|
||||
$bacvalue=0;
|
||||
}
|
||||
if($APV<=$threshold) {
|
||||
$acc2++;
|
||||
$bacvalue+=$APV
|
||||
}
|
||||
if($APV>$threshold){
|
||||
$acc1++;
|
||||
$bacvalue+=$APV
|
||||
}
|
||||
}
|
||||
if($position==(length($protein)-(($window_size)-1)) && $acc2>=10) {
|
||||
my $init=$position-$acc2-2;
|
||||
my $last=$position-1;
|
||||
my $bacvalue=(($bacvalue)/($last-$init+1));
|
||||
$bacindex++;
|
||||
$prob = &Math::CDF::pnorm(($bacvalue-0.2584)/0.02479);
|
||||
$prob*=100;
|
||||
my $rbacvalue = nearest(.001, $bacvalue);
|
||||
my $rprob = nearest(1, $prob);
|
||||
print RS "Antimicrobial stretch found in $init to $last. Propensity value $rbacvalue ($rprob %) \n";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
print RS "# This protein has $bacindex bactericidal stretches \n";
|
||||
my $manvalue = nearest(.001, $amvalue/(length($protein)-6));
|
||||
print RS "# This protein has a mean antimicrobial value of $manvalue \n";
|
||||
|
||||
close(KD) or die("Could not close file: $!\n");
|
||||
}
|
||||
|
||||
|
||||
sub gnuplot_sld {
|
||||
my $cmdline = "|$gnuplot -persist";
|
||||
|
||||
open (GP, $cmdline) or die "no gnuplot";
|
||||
# force buffer to flush after each write
|
||||
use FileHandle;
|
||||
GP->autoflush(1);
|
||||
|
||||
print GP "set title \"Antimicrobial Profile\"\n";
|
||||
print GP "set xlabel \"Position\"\n";
|
||||
print GP "set ylabel \"Score\"\n";
|
||||
print GP "set grid\n";
|
||||
print GP "set data style lines\n";
|
||||
|
||||
# if an output has been specified output to it
|
||||
if( $graph_file ne "" ) {
|
||||
print GP "set terminal png large enhanced size 800 600\n";
|
||||
print GP "set output '$graph_file' \n";
|
||||
}
|
||||
|
||||
print GP "plot \"$data_file\" u 1:2 t \"Antimicrobial profile \" w lines\n";
|
||||
close GP;
|
||||
}
|
||||
|
||||
BIN
nextflow/tests/blast-db/tiny.phr
Normal file
BIN
nextflow/tests/blast-db/tiny.phr
Normal file
Binary file not shown.
BIN
nextflow/tests/blast-db/tiny.pin
Normal file
BIN
nextflow/tests/blast-db/tiny.pin
Normal file
Binary file not shown.
BIN
nextflow/tests/blast-db/tiny.pog
Normal file
BIN
nextflow/tests/blast-db/tiny.pog
Normal file
Binary file not shown.
94
nextflow/tests/blast-db/tiny.psd
Normal file
94
nextflow/tests/blast-db/tiny.psd
Normal file
@@ -0,0 +1,94 @@
|
||||
1abo:a0
|
||||
1abo:b1
|
||||
1abo:c2
|
||||
1abo:d3
|
||||
1ihb:a4
|
||||
1ihb:b5
|
||||
1ihc:a6
|
||||
1ihd:a7
|
||||
1ihd:c8
|
||||
1ihf:a9
|
||||
1ihf:b10
|
||||
1ihf:c11
|
||||
1ihf:d12
|
||||
1ihf:e13
|
||||
1ihg:a14
|
||||
1ihh:a15
|
||||
1ihh:b16
|
||||
1ihi:a17
|
||||
1ihi:b18
|
||||
1ihm:a19
|
||||
1ihm:b20
|
||||
1ihm:c21
|
||||
1ihn:a22
|
||||
1ihn:b23
|
||||
1iho:a24
|
||||
1iho:b25
|
||||
1ihp:a26
|
||||
1ihq:a27
|
||||
1ihq:b28
|
||||
1ihr:a29
|
||||
1ihr:b30
|
||||
1ihs:h31
|
||||
1ihs:i32
|
||||
1ihs:l33
|
||||
1iht:h34
|
||||
1iht:i35
|
||||
1iht:l36
|
||||
1ihu:a37
|
||||
1ihv:a38
|
||||
1ihv:b39
|
||||
1ihw:a40
|
||||
1ihw:b41
|
||||
1ihz:a42
|
||||
1pht:a43
|
||||
1vie:a44
|
||||
1ycs:a45
|
||||
1ycs:b46
|
||||
lcl|1abo:a0
|
||||
lcl|1abo:b1
|
||||
lcl|1abo:c2
|
||||
lcl|1abo:d3
|
||||
lcl|1ihb:a4
|
||||
lcl|1ihb:b5
|
||||
lcl|1ihc:a6
|
||||
lcl|1ihd:a7
|
||||
lcl|1ihd:c8
|
||||
lcl|1ihf:a9
|
||||
lcl|1ihf:b10
|
||||
lcl|1ihf:c11
|
||||
lcl|1ihf:d12
|
||||
lcl|1ihf:e13
|
||||
lcl|1ihg:a14
|
||||
lcl|1ihh:a15
|
||||
lcl|1ihh:b16
|
||||
lcl|1ihi:a17
|
||||
lcl|1ihi:b18
|
||||
lcl|1ihm:a19
|
||||
lcl|1ihm:b20
|
||||
lcl|1ihm:c21
|
||||
lcl|1ihn:a22
|
||||
lcl|1ihn:b23
|
||||
lcl|1iho:a24
|
||||
lcl|1iho:b25
|
||||
lcl|1ihp:a26
|
||||
lcl|1ihq:a27
|
||||
lcl|1ihq:b28
|
||||
lcl|1ihr:a29
|
||||
lcl|1ihr:b30
|
||||
lcl|1ihs:h31
|
||||
lcl|1ihs:i32
|
||||
lcl|1ihs:l33
|
||||
lcl|1iht:h34
|
||||
lcl|1iht:i35
|
||||
lcl|1iht:l36
|
||||
lcl|1ihu:a37
|
||||
lcl|1ihv:a38
|
||||
lcl|1ihv:b39
|
||||
lcl|1ihw:a40
|
||||
lcl|1ihw:b41
|
||||
lcl|1ihz:a42
|
||||
lcl|1pht:a43
|
||||
lcl|1vie:a44
|
||||
lcl|1ycs:a45
|
||||
lcl|1ycs:b46
|
||||
BIN
nextflow/tests/blast-db/tiny.psi
Normal file
BIN
nextflow/tests/blast-db/tiny.psi
Normal file
Binary file not shown.
BIN
nextflow/tests/blast-db/tiny.psq
Normal file
BIN
nextflow/tests/blast-db/tiny.psq
Normal file
Binary file not shown.
66
nextflow/tests/blast-parallel.nf
Normal file
66
nextflow/tests/blast-parallel.nf
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.db = "$baseDir/blast-db/tiny"
|
||||
params.query = "$baseDir/data/sample.fa"
|
||||
params.chunk = 1
|
||||
|
||||
/*
|
||||
* Extends a BLAST query for each entry in the 'chunks' channel
|
||||
*/
|
||||
process blast {
|
||||
input:
|
||||
path 'query.fa'
|
||||
val db
|
||||
|
||||
output:
|
||||
path 'top_hits'
|
||||
|
||||
script:
|
||||
"""
|
||||
blastp -db ${db} -query query.fa -outfmt 6 > blast_result
|
||||
cat blast_result | head -n 10 | cut -f 2 > top_hits
|
||||
"""
|
||||
}
|
||||
|
||||
/*
|
||||
* Find out the top 10 matches returned by the BLAST query
|
||||
*/
|
||||
process extract {
|
||||
input:
|
||||
path 'top_hits'
|
||||
path db
|
||||
|
||||
output:
|
||||
path 'sequences'
|
||||
|
||||
script:
|
||||
"blastdbcmd -db ${db} -entry_batch top_hits | head -n 10 > sequences"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Aligns a T-Coffee MSA and print it
|
||||
*/
|
||||
process align {
|
||||
debug true
|
||||
|
||||
input:
|
||||
path all_seq
|
||||
|
||||
script:
|
||||
"t_coffee $all_seq 2>/dev/null | tee align_result"
|
||||
}
|
||||
|
||||
/*
|
||||
* main flow
|
||||
*/
|
||||
workflow {
|
||||
ch_fasta = channel.fromPath(params.query)
|
||||
| splitFasta(by: params.chunk, file:true)
|
||||
|
||||
ch_sequences = blast(ch_fasta, params.db)
|
||||
|
||||
extract(ch_sequences, params.db)
|
||||
| collectFile(name:'all_seq') // Collect all hits to a single file called 'all_seq'
|
||||
| align
|
||||
}
|
||||
43
nextflow/tests/blast.nf
Normal file
43
nextflow/tests/blast.nf
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.db = "$baseDir/blast-db/tiny"
|
||||
params.query = "$baseDir/data/sample.fa"
|
||||
params.chunkSize = 1
|
||||
|
||||
process blast {
|
||||
input:
|
||||
path 'seq.fa'
|
||||
val db
|
||||
|
||||
output:
|
||||
path 'out'
|
||||
|
||||
script:
|
||||
"""
|
||||
blastp -db $db -query seq.fa -outfmt 6 > out
|
||||
"""
|
||||
}
|
||||
|
||||
process sort {
|
||||
input:
|
||||
path 'hits_*'
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
script:
|
||||
"""
|
||||
sort hits_*
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
ch_fasta = channel.fromPath(params.query)
|
||||
| splitFasta( by: params.chunkSize, file:true )
|
||||
|
||||
blast(ch_fasta, params.db)
|
||||
| collect
|
||||
| sort
|
||||
| subscribe { hits -> println hits }
|
||||
}
|
||||
23
nextflow/tests/buffer.nf
Normal file
23
nextflow/tests/buffer.nf
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
process blastThemAll {
|
||||
debug true
|
||||
|
||||
input:
|
||||
path x
|
||||
|
||||
script:
|
||||
"""
|
||||
echo $x
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
Channel
|
||||
.fromPath("$baseDir/data/p?.fa") |
|
||||
toSortedList |
|
||||
flatten |
|
||||
buffer(size:2, remainder: true) |
|
||||
blastThemAll
|
||||
}
|
||||
9
nextflow/tests/cache-bak.nf
Normal file
9
nextflow/tests/cache-bak.nf
Normal file
@@ -0,0 +1,9 @@
|
||||
workflow {
|
||||
foo()
|
||||
}
|
||||
|
||||
process foo {
|
||||
debug true
|
||||
script:
|
||||
/echo Hello world/
|
||||
}
|
||||
2
nextflow/tests/checks/.IGNORE
Normal file
2
nextflow/tests/checks/.IGNORE
Normal file
@@ -0,0 +1,2 @@
|
||||
# TEST TO BE IGNORED
|
||||
plugin-registry.nf
|
||||
8
nextflow/tests/checks/.IGNORE-DOCKER
Normal file
8
nextflow/tests/checks/.IGNORE-DOCKER
Normal 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
|
||||
14
nextflow/tests/checks/.IGNORE-PARSER-V2
Normal file
14
nextflow/tests/checks/.IGNORE-PARSER-V2
Normal 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
|
||||
47
nextflow/tests/checks/agent-output-error.nf/.checks
Normal file
47
nextflow/tests/checks/agent-output-error.nf/.checks
Normal 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"
|
||||
46
nextflow/tests/checks/agent-output.nf/.checks
Normal file
46
nextflow/tests/checks/agent-output.nf/.checks
Normal 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"
|
||||
1
nextflow/tests/checks/agent-output.nf/.expected
Normal file
1
nextflow/tests/checks/agent-output.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
World received: Hello from agent mode
|
||||
17
nextflow/tests/checks/ampa.nf/.checks
Normal file
17
nextflow/tests/checks/ampa.nf/.checks
Normal 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
|
||||
|
||||
15
nextflow/tests/checks/ampa.nf/.expected
Normal file
15
nextflow/tests/checks/ampa.nf/.expected
Normal 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
|
||||
19
nextflow/tests/checks/basic.nf/.checks
Normal file
19
nextflow/tests/checks/basic.nf/.checks
Normal 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
|
||||
|
||||
15
nextflow/tests/checks/basic.nf/.expected
Normal file
15
nextflow/tests/checks/basic.nf/.expected
Normal file
@@ -0,0 +1,15 @@
|
||||
Aoba1>
|
||||
SPVWGQGNKTQAECWEGNHNYGLVRLKEGKTISLTNDGSAVFDYLAVFLN
|
||||
NVPTIYN
|
||||
Bscy1>
|
||||
YGEKDNLRAWWWEIEDEDERHIITMCDGEKMPLEDDNQPEYDWLAYIVGK
|
||||
PYLGLLNRPV
|
||||
thp1>
|
||||
GIEEPRAEQGDSFGLAVLSGKNVTLIDGLHLDIDEEREKKYDYLARYQYG
|
||||
PSIKKRGIYEVYTGPFDGREGTTENYGNLW
|
||||
eiv1>
|
||||
IRELAAVPYIQVSGPHAESEVAYGEPTLNTCYWGVIQGQWAAGSKKRVRD
|
||||
N
|
||||
Avhi1>
|
||||
DRIIKAKRRPVVKIDSNDQIVVAGEGKWLLKAPGKWVPDRSDRYYVRFN
|
||||
|
||||
19
nextflow/tests/checks/blast-parallel.nf/.checks
Normal file
19
nextflow/tests/checks/blast-parallel.nf/.checks
Normal 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
|
||||
284
nextflow/tests/checks/blast-parallel.nf/.expected
Normal file
284
nextflow/tests/checks/blast-parallel.nf/.expected
Normal 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
|
||||
|
||||
|
||||
|
||||
|
||||
20
nextflow/tests/checks/blast.nf/.checks
Normal file
20
nextflow/tests/checks/blast.nf/.checks
Normal 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
|
||||
|
||||
34
nextflow/tests/checks/blast.nf/.expected
Normal file
34
nextflow/tests/checks/blast.nf/.expected
Normal 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
|
||||
|
||||
21
nextflow/tests/checks/buffer.nf/.checks
Normal file
21
nextflow/tests/checks/buffer.nf/.checks
Normal 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
|
||||
42
nextflow/tests/checks/cache-bak.nf/.checks
Normal file
42
nextflow/tests/checks/cache-bak.nf/.checks
Normal 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
|
||||
15
nextflow/tests/checks/chunk.nf/.checks
Normal file
15
nextflow/tests/checks/chunk.nf/.checks
Normal 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
|
||||
14
nextflow/tests/checks/chunk.nf/.data.fa
Normal file
14
nextflow/tests/checks/chunk.nf/.data.fa
Normal file
@@ -0,0 +1,14 @@
|
||||
>1aboA
|
||||
NLFVALYDFVASGDNTLSITKGEKLRVLGYNHNGEWCEAQTKNGQGWVPS
|
||||
NYITPVN
|
||||
>1ycsB
|
||||
KGVIYALWDYEPQNDDELPMKEGDCMTIIHREDEDEIEWWWARLNDKEGY
|
||||
VPRNLLGLYP
|
||||
>1pht
|
||||
GYQYRALYDYKKEREEDIDLHLGDILTVNKGSLVALGFSDGQEARPEEIG
|
||||
WLNGYNETTGERGDFPGTYVEYIGRKKISP
|
||||
>1vie
|
||||
DRVRKKSGAAWQGQIVGWYCTNLTPEGYAVESEAHPGSVQIYPVAALERI
|
||||
N
|
||||
>1ihvA
|
||||
NFRVYYRDSRDPVWKGPAKLLWKGEGAVVIQDNSDIKVVPRRKAKIIRD
|
||||
35
nextflow/tests/checks/cli-args.nf/.checks
Normal file
35
nextflow/tests/checks/cli-args.nf/.checks
Normal 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
|
||||
20
nextflow/tests/checks/cli-fs.nf/.checks
Normal file
20
nextflow/tests/checks/cli-fs.nf/.checks
Normal 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
|
||||
8
nextflow/tests/checks/collect-file.nf/.checks
Normal file
8
nextflow/tests/checks/collect-file.nf/.checks
Normal 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
|
||||
34
nextflow/tests/checks/collect-record.nf/.checks
Normal file
34
nextflow/tests/checks/collect-record.nf/.checks
Normal 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
|
||||
34
nextflow/tests/checks/collect-tuple.nf/.checks
Normal file
34
nextflow/tests/checks/collect-tuple.nf/.checks
Normal 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
|
||||
44
nextflow/tests/checks/complex-names.nf/.checks
Normal file
44
nextflow/tests/checks/complex-names.nf/.checks
Normal 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
|
||||
)
|
||||
39
nextflow/tests/checks/config-labels.nf/.checks
Normal file
39
nextflow/tests/checks/config-labels.nf/.checks
Normal 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
|
||||
11
nextflow/tests/checks/config-secrets.nf/.checks
Normal file
11
nextflow/tests/checks/config-secrets.nf/.checks
Normal 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
|
||||
20
nextflow/tests/checks/config-vars.nf/.checks
Normal file
20
nextflow/tests/checks/config-vars.nf/.checks
Normal 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
|
||||
|
||||
|
||||
21
nextflow/tests/checks/copy-no-follow.nf/.checks
Normal file
21
nextflow/tests/checks/copy-no-follow.nf/.checks
Normal 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
|
||||
23
nextflow/tests/checks/custom-lib.nf/.checks
Normal file
23
nextflow/tests/checks/custom-lib.nf/.checks
Normal 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
|
||||
|
||||
32
nextflow/tests/checks/demo.nf/.checks
Normal file
32
nextflow/tests/checks/demo.nf/.checks
Normal 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
|
||||
2
nextflow/tests/checks/dyn-mem.nf/.big.txt
Normal file
2
nextflow/tests/checks/dyn-mem.nf/.big.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
1234567890
|
||||
1234567890
|
||||
18
nextflow/tests/checks/dyn-mem.nf/.checks
Normal file
18
nextflow/tests/checks/dyn-mem.nf/.checks
Normal 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
|
||||
|
||||
1
nextflow/tests/checks/dyn-mem.nf/.small.txt
Normal file
1
nextflow/tests/checks/dyn-mem.nf/.small.txt
Normal file
@@ -0,0 +1 @@
|
||||
12345
|
||||
45
nextflow/tests/checks/dynamic-filename-typed.nf/.checks
Normal file
45
nextflow/tests/checks/dynamic-filename-typed.nf/.checks
Normal 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
|
||||
@@ -0,0 +1 @@
|
||||
Hello
|
||||
@@ -0,0 +1,2 @@
|
||||
Hello
|
||||
World
|
||||
45
nextflow/tests/checks/dynamic-filename.nf/.checks
Normal file
45
nextflow/tests/checks/dynamic-filename.nf/.checks
Normal 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
|
||||
2
nextflow/tests/checks/dynamic-filename.nf/.expected
Normal file
2
nextflow/tests/checks/dynamic-filename.nf/.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello
|
||||
World
|
||||
76
nextflow/tests/checks/dynamic-storedir.nf/.checks
Normal file
76
nextflow/tests/checks/dynamic-storedir.nf/.checks
Normal 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
|
||||
2
nextflow/tests/checks/dynamic-storedir.nf/.expected
Normal file
2
nextflow/tests/checks/dynamic-storedir.nf/.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello
|
||||
World
|
||||
35
nextflow/tests/checks/each-file.nf/.checks
Normal file
35
nextflow/tests/checks/each-file.nf/.checks
Normal 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
|
||||
@@ -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
|
||||
78
nextflow/tests/checks/env-container.nf/.checks
Normal file
78
nextflow/tests/checks/env-container.nf/.checks
Normal 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
|
||||
17
nextflow/tests/checks/env-typed.nf/.checks
Normal file
17
nextflow/tests/checks/env-typed.nf/.checks
Normal 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
|
||||
|
||||
17
nextflow/tests/checks/env.nf/.checks
Normal file
17
nextflow/tests/checks/env.nf/.checks
Normal 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
|
||||
|
||||
21
nextflow/tests/checks/error-finish.nf/.checks
Normal file
21
nextflow/tests/checks/error-finish.nf/.checks
Normal 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
|
||||
13
nextflow/tests/checks/error-ignore-then-fail.nf/.checks
Normal file
13
nextflow/tests/checks/error-ignore-then-fail.nf/.checks
Normal 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
|
||||
6
nextflow/tests/checks/error-ignore-then-fail.nf/.config
Normal file
6
nextflow/tests/checks/error-ignore-then-fail.nf/.config
Normal file
@@ -0,0 +1,6 @@
|
||||
workflow {
|
||||
failOnIgnore = true
|
||||
}
|
||||
process {
|
||||
errorStrategy = 'ignore'
|
||||
}
|
||||
11
nextflow/tests/checks/error-message.nf/.checks
Normal file
11
nextflow/tests/checks/error-message.nf/.checks
Normal 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
|
||||
23
nextflow/tests/checks/error.nf/.checks
Normal file
23
nextflow/tests/checks/error.nf/.checks
Normal 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
|
||||
1
nextflow/tests/checks/error.nf/.config
Normal file
1
nextflow/tests/checks/error.nf/.config
Normal file
@@ -0,0 +1 @@
|
||||
process.errorStrategy = { task.exitStatus >= 1 ? 'retry' : 'ignore' }
|
||||
24
nextflow/tests/checks/escape-globs.nf/.checks
Normal file
24
nextflow/tests/checks/escape-globs.nf/.checks
Normal 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
|
||||
|
||||
17
nextflow/tests/checks/eval-out-typed.nf/.checks
Normal file
17
nextflow/tests/checks/eval-out-typed.nf/.checks
Normal 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
|
||||
|
||||
17
nextflow/tests/checks/eval-out.nf/.checks
Normal file
17
nextflow/tests/checks/eval-out.nf/.checks
Normal 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
|
||||
|
||||
10
nextflow/tests/checks/exit-if-empty.nf/.checks
Normal file
10
nextflow/tests/checks/exit-if-empty.nf/.checks
Normal 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
|
||||
18
nextflow/tests/checks/exitstatus-fail.nf/.checks
Normal file
18
nextflow/tests/checks/exitstatus-fail.nf/.checks
Normal 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
|
||||
21
nextflow/tests/checks/fair.nf/.checks
Normal file
21
nextflow/tests/checks/fair.nf/.checks
Normal 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
|
||||
26
nextflow/tests/checks/fair.nf/.expected
Normal file
26
nextflow/tests/checks/fair.nf/.expected
Normal 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]
|
||||
20
nextflow/tests/checks/file-with-blanks.nf/.checks
Normal file
20
nextflow/tests/checks/file-with-blanks.nf/.checks
Normal 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
|
||||
20
nextflow/tests/checks/file-with-quote.nf/.checks
Normal file
20
nextflow/tests/checks/file-with-quote.nf/.checks
Normal 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
|
||||
25
nextflow/tests/checks/files.nf/.checks
Normal file
25
nextflow/tests/checks/files.nf/.checks
Normal 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
|
||||
27
nextflow/tests/checks/fusion-symlink.nf/.checks
Normal file
27
nextflow/tests/checks/fusion-symlink.nf/.checks
Normal 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
|
||||
5
nextflow/tests/checks/fusion-symlink.nf/.config
Normal file
5
nextflow/tests/checks/fusion-symlink.nf/.config
Normal 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://'
|
||||
1
nextflow/tests/checks/fusion-symlink.nf/.expected
Normal file
1
nextflow/tests/checks/fusion-symlink.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
HELLO
|
||||
27
nextflow/tests/checks/glob.nf/.checks
Normal file
27
nextflow/tests/checks/glob.nf/.checks
Normal 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
|
||||
31
nextflow/tests/checks/hello.nf/.checks
Normal file
31
nextflow/tests/checks/hello.nf/.checks
Normal 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
|
||||
28
nextflow/tests/checks/input.nf/.checks
Normal file
28
nextflow/tests/checks/input.nf/.checks
Normal 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
|
||||
21
nextflow/tests/checks/mixing-langs.nf/.checks
Normal file
21
nextflow/tests/checks/mixing-langs.nf/.checks
Normal 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
|
||||
1
nextflow/tests/checks/mixing-langs.nf/.expected
Normal file
1
nextflow/tests/checks/mixing-langs.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
avg: 43.5159945284 - 36.8211561596
|
||||
20
nextflow/tests/checks/nativeCode.nf/.checks
Normal file
20
nextflow/tests/checks/nativeCode.nf/.checks
Normal 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
|
||||
18
nextflow/tests/checks/nullable-path.nf/.checks
Normal file
18
nextflow/tests/checks/nullable-path.nf/.checks
Normal 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
|
||||
2
nextflow/tests/checks/nullable-path.nf/.expected
Normal file
2
nextflow/tests/checks/nullable-path.nf/.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
empty input
|
||||
|
||||
18
nextflow/tests/checks/opt-file.nf/.checks
Normal file
18
nextflow/tests/checks/opt-file.nf/.checks
Normal 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
|
||||
102
nextflow/tests/checks/output-dsl.nf/.checks
Normal file
102
nextflow/tests/checks/output-dsl.nf/.checks
Normal 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
|
||||
8
nextflow/tests/checks/output-dsl.nf/.expected-json
Normal file
8
nextflow/tests/checks/output-dsl.nf/.expected-json
Normal 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"
|
||||
}
|
||||
}
|
||||
11
nextflow/tests/checks/output-dsl.nf/.expected-text
Normal file
11
nextflow/tests/checks/output-dsl.nf/.expected-text
Normal 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
|
||||
25
nextflow/tests/checks/output-file.nf/.checks
Normal file
25
nextflow/tests/checks/output-file.nf/.checks
Normal 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
|
||||
|
||||
28
nextflow/tests/checks/output-globs.nf/.checks
Normal file
28
nextflow/tests/checks/output-globs.nf/.checks
Normal 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
|
||||
|
||||
18
nextflow/tests/checks/output-links.nf/.checks
Normal file
18
nextflow/tests/checks/output-links.nf/.checks
Normal 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
|
||||
|
||||
30
nextflow/tests/checks/output-val.nf/.checks
Normal file
30
nextflow/tests/checks/output-val.nf/.checks
Normal 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
|
||||
|
||||
48
nextflow/tests/checks/params-dsl.nf/.checks
Normal file
48
nextflow/tests/checks/params-dsl.nf/.checks
Normal 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'
|
||||
14
nextflow/tests/checks/plugin-registry.nf/.checks
Normal file
14
nextflow/tests/checks/plugin-registry.nf/.checks
Normal 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user