add nextflow d30e48d
This commit is contained in:
9
nextflow/tests-v1/.gitignore
vendored
Normal file
9
nextflow/tests-v1/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
.cache
|
||||
.nextflow.*
|
||||
.vagrant
|
||||
Vagrantfile
|
||||
scratch
|
||||
results
|
||||
work
|
||||
**/checks.out
|
||||
**/stdout
|
||||
42
nextflow/tests-v1/Dockerfile
Normal file
42
nextflow/tests-v1/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"
|
||||
|
||||
3
nextflow/tests-v1/README.md
Normal file
3
nextflow/tests-v1/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Nextflow tests (v1)
|
||||
|
||||
This folder contains the integration tests from before the [strict syntax](https://nextflow.io/docs/latest/updating-syntax.html#preparing-for-strict-syntax) was introduced. It is providied here as a historical reference, and to ensure that the lenient script parser continues to behave consistently.
|
||||
31
nextflow/tests-v1/ampa.nf
Normal file
31
nextflow/tests-v1/ampa.nf
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
"""
|
||||
AMPA.pl -in=${seq} -noplot -rf=result -df=data
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
workflow {
|
||||
Channel.fromPath(params.in) |
|
||||
splitFasta(file:true) |
|
||||
ampaTask |
|
||||
view { it.text }
|
||||
}
|
||||
|
||||
46
nextflow/tests-v1/basic.nf
Normal file
46
nextflow/tests-v1/basic.nf
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/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_*'
|
||||
|
||||
"""
|
||||
awk '/^>/{f="seq_"++d} {print > f}' < input.fa
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple reverse the sequences
|
||||
*/
|
||||
process reverse {
|
||||
|
||||
input:
|
||||
path x
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
"""
|
||||
cat $x | rev
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
splitSequences(params.in) | reverse | view
|
||||
}
|
||||
|
||||
334
nextflow/tests-v1/bin/AMPA.pl
Executable file
334
nextflow/tests-v1/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-v1/blast-db/tiny.phr
Normal file
BIN
nextflow/tests-v1/blast-db/tiny.phr
Normal file
Binary file not shown.
BIN
nextflow/tests-v1/blast-db/tiny.pin
Normal file
BIN
nextflow/tests-v1/blast-db/tiny.pin
Normal file
Binary file not shown.
BIN
nextflow/tests-v1/blast-db/tiny.pog
Normal file
BIN
nextflow/tests-v1/blast-db/tiny.pog
Normal file
Binary file not shown.
94
nextflow/tests-v1/blast-db/tiny.psd
Normal file
94
nextflow/tests-v1/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-v1/blast-db/tiny.psi
Normal file
BIN
nextflow/tests-v1/blast-db/tiny.psi
Normal file
Binary file not shown.
BIN
nextflow/tests-v1/blast-db/tiny.psq
Normal file
BIN
nextflow/tests-v1/blast-db/tiny.psq
Normal file
Binary file not shown.
62
nextflow/tests-v1/blast-parallel.nf
Normal file
62
nextflow/tests-v1/blast-parallel.nf
Normal file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.db = "$baseDir/blast-db/tiny"
|
||||
params.query = "$baseDir/data/sample.fa"
|
||||
params.chunk = 1
|
||||
|
||||
db = file(params.db)
|
||||
|
||||
/*
|
||||
* Extends a BLAST query for each entry in the 'chunks' channel
|
||||
*/
|
||||
process blast {
|
||||
input:
|
||||
path 'query.fa'
|
||||
|
||||
output:
|
||||
path top_hits
|
||||
|
||||
"""
|
||||
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
|
||||
|
||||
output:
|
||||
path 'sequences'
|
||||
|
||||
"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
|
||||
|
||||
"t_coffee $all_seq 2>/dev/null | tee align_result"
|
||||
}
|
||||
|
||||
/*
|
||||
* main flow
|
||||
*/
|
||||
workflow {
|
||||
Channel.fromPath(params.query) |
|
||||
splitFasta(by: params.chunk, file:true) |
|
||||
blast |
|
||||
extract |
|
||||
collectFile(name:'all_seq') | // Collect all hits to a single file called 'all_seq'
|
||||
align
|
||||
|
||||
}
|
||||
41
nextflow/tests-v1/blast.nf
Normal file
41
nextflow/tests-v1/blast.nf
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
params.db = "$baseDir/blast-db/tiny"
|
||||
params.query = "$baseDir/data/sample.fa"
|
||||
params.chunkSize = 1
|
||||
|
||||
DB = file(params.db)
|
||||
|
||||
process blast {
|
||||
input:
|
||||
path 'seq.fa'
|
||||
|
||||
output:
|
||||
path 'out'
|
||||
|
||||
"""
|
||||
blastp -db $DB -query seq.fa -outfmt 6 > out
|
||||
"""
|
||||
}
|
||||
|
||||
process sort {
|
||||
input:
|
||||
path 'hits_*'
|
||||
|
||||
output:
|
||||
stdout
|
||||
|
||||
"""
|
||||
sort hits_*
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
Channel.fromPath(params.query) |
|
||||
splitFasta( by: params.chunkSize, file:true ) |
|
||||
blast |
|
||||
collect |
|
||||
sort |
|
||||
subscribe { println it }
|
||||
}
|
||||
22
nextflow/tests-v1/buffer.nf
Normal file
22
nextflow/tests-v1/buffer.nf
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
process blastThemAll {
|
||||
debug true
|
||||
|
||||
input:
|
||||
path x
|
||||
|
||||
"""
|
||||
echo $x
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
workflow {
|
||||
Channel
|
||||
.fromPath("$baseDir/data/p?.fa") |
|
||||
toSortedList |
|
||||
flatten |
|
||||
buffer(size:2, remainder: true) |
|
||||
blastThemAll
|
||||
}
|
||||
8
nextflow/tests-v1/cache-bak.nf
Normal file
8
nextflow/tests-v1/cache-bak.nf
Normal file
@@ -0,0 +1,8 @@
|
||||
workflow {
|
||||
foo()
|
||||
}
|
||||
|
||||
process foo {
|
||||
debug true
|
||||
/echo Hello world/
|
||||
}
|
||||
14
nextflow/tests-v1/checks/.PARSER-V1
Normal file
14
nextflow/tests-v1/checks/.PARSER-V1
Normal file
@@ -0,0 +1,14 @@
|
||||
# ADDITIONAL TESTS TO VERIFY THE V1 PARSER
|
||||
complex-names.nf
|
||||
env-out.nf
|
||||
env2.nf
|
||||
error-finish.nf
|
||||
output-globs.nf
|
||||
output-dsl.nf
|
||||
output-val.nf
|
||||
publish-saveas.nf
|
||||
singleton.nf
|
||||
subworkflow.nf
|
||||
task-retry.nf
|
||||
tuples.nf
|
||||
when-block.nf
|
||||
17
nextflow/tests-v1/checks/ampa.nf/.checks
Normal file
17
nextflow/tests-v1/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-v1/checks/ampa.nf/.expected
Normal file
15
nextflow/tests-v1/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-v1/checks/basic.nf/.checks
Normal file
19
nextflow/tests-v1/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-v1/checks/basic.nf/.expected
Normal file
15
nextflow/tests-v1/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-v1/checks/blast-parallel.nf/.checks
Normal file
19
nextflow/tests-v1/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-v1/checks/blast-parallel.nf/.expected
Normal file
284
nextflow/tests-v1/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-v1/checks/blast.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/blast.nf/.expected
Normal file
34
nextflow/tests-v1/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-v1/checks/buffer.nf/.checks
Normal file
21
nextflow/tests-v1/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-v1/checks/cache-bak.nf/.checks
Normal file
42
nextflow/tests-v1/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-v1/checks/chunk.nf/.checks
Normal file
15
nextflow/tests-v1/checks/chunk.nf/.checks
Normal file
@@ -0,0 +1,15 @@
|
||||
set -e
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
$NXF_RUN --chunkSize 3 < .data.fa | tee .stdout
|
||||
|
||||
[[ `grep -c 'Submitted process > foo' .nextflow.log` == 2 ]] || false
|
||||
|
||||
#
|
||||
# run resume mode
|
||||
#
|
||||
$NXF_RUN -resume --chunkSize 3 < .data.fa | tee .stdout
|
||||
|
||||
[[ `grep -c 'Cached process > foo' .nextflow.log` == 2 ]] || false
|
||||
14
nextflow/tests-v1/checks/chunk.nf/.data.fa
Normal file
14
nextflow/tests-v1/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-v1/checks/cli-args.nf/.checks
Normal file
35
nextflow/tests-v1/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-v1/checks/cli-fs.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/collect-file.nf/.checks
Normal file
8
nextflow/tests-v1/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-v1/checks/collect-tuple.nf/.checks
Normal file
34
nextflow/tests-v1/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-v1/checks/complex-names.nf/.checks
Normal file
44
nextflow/tests-v1/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-v1/checks/config-labels.nf/.checks
Normal file
39
nextflow/tests-v1/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
|
||||
20
nextflow/tests-v1/checks/config-vars.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/copy-no-follow.nf/.checks
Normal file
21
nextflow/tests-v1/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-v1/checks/custom-lib.nf/.checks
Normal file
23
nextflow/tests-v1/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-v1/checks/demo.nf/.checks
Normal file
32
nextflow/tests-v1/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-v1/checks/dyn-mem.nf/.big.txt
Normal file
2
nextflow/tests-v1/checks/dyn-mem.nf/.big.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
1234567890
|
||||
1234567890
|
||||
18
nextflow/tests-v1/checks/dyn-mem.nf/.checks
Normal file
18
nextflow/tests-v1/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-v1/checks/dyn-mem.nf/.small.txt
Normal file
1
nextflow/tests-v1/checks/dyn-mem.nf/.small.txt
Normal file
@@ -0,0 +1 @@
|
||||
12345
|
||||
45
nextflow/tests-v1/checks/dynamic-filename.nf/.checks
Normal file
45
nextflow/tests-v1/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-v1/checks/dynamic-filename.nf/.expected
Normal file
2
nextflow/tests-v1/checks/dynamic-filename.nf/.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello
|
||||
World
|
||||
76
nextflow/tests-v1/checks/dynamic-storedir.nf/.checks
Normal file
76
nextflow/tests-v1/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-v1/checks/dynamic-storedir.nf/.expected
Normal file
2
nextflow/tests-v1/checks/dynamic-storedir.nf/.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello
|
||||
World
|
||||
35
nextflow/tests-v1/checks/each-file.nf/.checks
Normal file
35
nextflow/tests-v1/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,77 @@
|
||||
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 {
|
||||
echo true
|
||||
input:
|
||||
env BAR
|
||||
'''
|
||||
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
|
||||
77
nextflow/tests-v1/checks/env-container.nf/.checks
Normal file
77
nextflow/tests-v1/checks/env-container.nf/.checks
Normal file
@@ -0,0 +1,77 @@
|
||||
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 {
|
||||
echo true
|
||||
input:
|
||||
env BAR
|
||||
'''
|
||||
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-v1/checks/env-out.nf/.checks
Normal file
17
nextflow/tests-v1/checks/env-out.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-v1/checks/error-finish.nf/.checks
Normal file
21
nextflow/tests-v1/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-v1/checks/error-ignore-then-fail.nf/.checks
Normal file
13
nextflow/tests-v1/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
|
||||
@@ -0,0 +1,6 @@
|
||||
workflow {
|
||||
failOnIgnore = true
|
||||
}
|
||||
process {
|
||||
errorStrategy = 'ignore'
|
||||
}
|
||||
6
nextflow/tests-v1/checks/error-message.nf/.checks
Normal file
6
nextflow/tests-v1/checks/error-message.nf/.checks
Normal file
@@ -0,0 +1,6 @@
|
||||
set +e
|
||||
$NXF_RUN | tee stdout
|
||||
set -e
|
||||
|
||||
< stdout grep "Check script '.*error-message.nf' at line: 19"
|
||||
|
||||
23
nextflow/tests-v1/checks/error.nf/.checks
Normal file
23
nextflow/tests-v1/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-v1/checks/error.nf/.config
Normal file
1
nextflow/tests-v1/checks/error.nf/.config
Normal file
@@ -0,0 +1 @@
|
||||
process.errorStrategy = { task.exitStatus >= 1 ? 'retry' : 'ignore' }
|
||||
24
nextflow/tests-v1/checks/escape-globs.nf/.checks
Normal file
24
nextflow/tests-v1/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-v1/checks/eval-out.nf/.checks
Normal file
17
nextflow/tests-v1/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-v1/checks/exit-if-empty.nf/.checks
Normal file
10
nextflow/tests-v1/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-v1/checks/exitstatus-fail.nf/.checks
Normal file
18
nextflow/tests-v1/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-v1/checks/fair.nf/.checks
Normal file
21
nextflow/tests-v1/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-v1/checks/fair.nf/.expected
Normal file
26
nextflow/tests-v1/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-v1/checks/file-with-blanks.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/file-with-quote.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/files.nf/.checks
Normal file
25
nextflow/tests-v1/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-v1/checks/fusion-symlink.nf/.checks
Normal file
27
nextflow/tests-v1/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-v1/checks/fusion-symlink.nf/.config
Normal file
5
nextflow/tests-v1/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-v1/checks/fusion-symlink.nf/.expected
Normal file
1
nextflow/tests-v1/checks/fusion-symlink.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
HELLO
|
||||
27
nextflow/tests-v1/checks/glob.nf/.checks
Normal file
27
nextflow/tests-v1/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-v1/checks/hello.nf/.checks
Normal file
31
nextflow/tests-v1/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-v1/checks/input.nf/.checks
Normal file
28
nextflow/tests-v1/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-v1/checks/mixing-langs.nf/.checks
Normal file
21
nextflow/tests-v1/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-v1/checks/mixing-langs.nf/.expected
Normal file
1
nextflow/tests-v1/checks/mixing-langs.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
avg: 43.5159945284 - 36.8211561596
|
||||
20
nextflow/tests-v1/checks/nativeCode.nf/.checks
Normal file
20
nextflow/tests-v1/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-v1/checks/opt-file.nf/.checks
Normal file
18
nextflow/tests-v1/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
|
||||
78
nextflow/tests-v1/checks/output-dsl.nf/.checks
Normal file
78
nextflow/tests-v1/checks/output-dsl.nf/.checks
Normal file
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo First 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
|
||||
|
||||
[[ -f results/log/alpha.fastqc.log ]] || false
|
||||
[[ -f results/log/beta.fastqc.log ]] || false
|
||||
[[ -f results/log/delta.fastqc.log ]] || false
|
||||
[[ -f results/align/alpha.bai ]] || false
|
||||
[[ -f results/align/alpha.bam ]] || false
|
||||
[[ -f results/align/beta.bai ]] || false
|
||||
[[ -f results/align/beta.bam ]] || false
|
||||
[[ -f results/align/delta.bai ]] || false
|
||||
[[ -f results/align/delta.bam ]] || false
|
||||
[[ -L results/quant/alpha ]] || false
|
||||
[[ -L results/quant/beta ]] || false
|
||||
[[ -L results/quant/delta ]] || false
|
||||
[[ -f results/samples.csv ]] || false
|
||||
[[ -f results/summary.txt ]] || false
|
||||
|
||||
|
||||
#
|
||||
# one more time to make sure 'overwrite' is fine
|
||||
#
|
||||
echo Second 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
|
||||
|
||||
[[ -f results/log/alpha.fastqc.log ]] || false
|
||||
[[ -f results/log/beta.fastqc.log ]] || false
|
||||
[[ -f results/log/delta.fastqc.log ]] || false
|
||||
[[ -f results/align/alpha.bai ]] || false
|
||||
[[ -f results/align/alpha.bam ]] || false
|
||||
[[ -f results/align/beta.bai ]] || false
|
||||
[[ -f results/align/beta.bam ]] || false
|
||||
[[ -f results/align/delta.bai ]] || false
|
||||
[[ -f results/align/delta.bam ]] || false
|
||||
[[ -L results/quant/alpha ]] || false
|
||||
[[ -L results/quant/beta ]] || false
|
||||
[[ -L results/quant/delta ]] || false
|
||||
[[ -f results/samples.csv ]] || false
|
||||
[[ -f results/summary.txt ]] || false
|
||||
|
||||
|
||||
#
|
||||
# clean & run resume mode
|
||||
#
|
||||
echo Third 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/alpha.fastqc.log ]] || false
|
||||
[[ -f results/log/beta.fastqc.log ]] || false
|
||||
[[ -f results/log/delta.fastqc.log ]] || false
|
||||
[[ -f results/align/alpha.bai ]] || false
|
||||
[[ -f results/align/alpha.bam ]] || false
|
||||
[[ -f results/align/beta.bai ]] || false
|
||||
[[ -f results/align/beta.bam ]] || false
|
||||
[[ -f results/align/delta.bai ]] || false
|
||||
[[ -f results/align/delta.bam ]] || false
|
||||
[[ -L results/quant/alpha ]] || false
|
||||
[[ -L results/quant/beta ]] || false
|
||||
[[ -L results/quant/delta ]] || false
|
||||
[[ -f results/samples.csv ]] || false
|
||||
[[ -f results/summary.txt ]] || false
|
||||
25
nextflow/tests-v1/checks/output-file.nf/.checks
Normal file
25
nextflow/tests-v1/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-v1/checks/output-globs.nf/.checks
Normal file
28
nextflow/tests-v1/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-v1/checks/output-links.nf/.checks
Normal file
18
nextflow/tests-v1/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-v1/checks/output-val.nf/.checks
Normal file
30
nextflow/tests-v1/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
|
||||
|
||||
4
nextflow/tests-v1/checks/print-http-file.nf/.checks
Normal file
4
nextflow/tests-v1/checks/print-http-file.nf/.checks
Normal file
@@ -0,0 +1,4 @@
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `< stdout grep -c 'User-agent'` != 0 ]] || false
|
||||
[[ `< stdout grep -c 'Disallow'` != 0 ]] || false
|
||||
16
nextflow/tests-v1/checks/process-arity.nf/.checks
Normal file
16
nextflow/tests-v1/checks/process-arity.nf/.checks
Normal file
@@ -0,0 +1,16 @@
|
||||
set +e
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN
|
||||
[[ $? == 0 ]] || false
|
||||
|
||||
|
||||
#
|
||||
# RESUME mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN -resume
|
||||
[[ $? == 0 ]] || false
|
||||
43
nextflow/tests-v1/checks/profiles.nf/.checks
Normal file
43
nextflow/tests-v1/checks/profiles.nf/.checks
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# verify default profile
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config config | tee stdout
|
||||
cmp stdout .expected_profile_standard.txt || false
|
||||
|
||||
#
|
||||
# verify advanced profile
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config config -profile advanced | tee stdout
|
||||
cmp stdout .expected_profile_advanced.txt || false
|
||||
|
||||
#
|
||||
# verify *all* profile
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config config -a | tee stdout
|
||||
cmp stdout .expected_profile_all.txt || false
|
||||
|
||||
#
|
||||
# verify return error
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config config -profile xxx 2>&1| tee stdout
|
||||
[[ ${PIPESTATUS[0]} == 0 ]] && exit 1
|
||||
< stdout grep "Unknown configuration profile: 'xxx'" || false
|
||||
|
||||
#
|
||||
# Verify run uses the default profile
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT | tee stdout
|
||||
< stdout grep "cpus: 2 memory: 2 GB" || false
|
||||
|
||||
#
|
||||
# Verify run uses the *advanced* profile
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT -profile advanced | tee stdout
|
||||
< stdout grep "cpus: 8 memory: 10 GB" || false
|
||||
|
||||
#
|
||||
# Verify that return an error code
|
||||
#
|
||||
$NXF_CMD -C ../../profiles.config run $NXF_SCRIPT -profile foo 2>&1| tee stdout
|
||||
[[ ${PIPESTATUS[0]} == 0 ]] && exit 1
|
||||
< stdout grep "Unknown configuration profile: 'foo'" || false
|
||||
@@ -0,0 +1,8 @@
|
||||
echo = true
|
||||
foo = 'bar'
|
||||
|
||||
process {
|
||||
cpus = 8
|
||||
memory = '10GB'
|
||||
disk = '300GB'
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
echo = true
|
||||
foo = 'bar'
|
||||
|
||||
profiles {
|
||||
standard {
|
||||
process {
|
||||
cpus = 2
|
||||
memory = '2GB'
|
||||
}
|
||||
}
|
||||
advanced {
|
||||
process {
|
||||
cpus = 8
|
||||
memory = '10GB'
|
||||
disk = '300GB'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
echo = true
|
||||
foo = 'bar'
|
||||
|
||||
process {
|
||||
cpus = 2
|
||||
memory = '2GB'
|
||||
}
|
||||
10
nextflow/tests-v1/checks/property-out-vals.nf/.checks
Normal file
10
nextflow/tests-v1/checks/property-out-vals.nf/.checks
Normal file
@@ -0,0 +1,10 @@
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `< stdout grep -c 'exit_status=0'` != 0 ]] || false
|
||||
[[ `< stdout grep -c 'record=aaa_bbb'` != 0 ]] || false
|
||||
|
||||
|
||||
$NXF_RUN -resume | tee stdout
|
||||
|
||||
[[ `< stdout grep -c 'exit_status=0'` != 0 ]] || false
|
||||
[[ `< stdout grep -c 'record=aaa_bbb'` != 0 ]] || false
|
||||
73
nextflow/tests-v1/checks/publish-dir.nf/.checks
Normal file
73
nextflow/tests-v1/checks/publish-dir.nf/.checks
Normal file
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo First run
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > my_combine'` == 1 ]] || false
|
||||
cmp stdout .expected || false
|
||||
|
||||
[[ -f data/alpha.bai ]] || false
|
||||
[[ -f data/alpha.bam ]] || false
|
||||
[[ -f data/beta.bai ]] || false
|
||||
[[ -f data/beta.bam ]] || false
|
||||
[[ -f data/delta.bai ]] || false
|
||||
[[ -f data/delta.bam ]] || false
|
||||
[[ -L data/result.txt ]] || false
|
||||
[[ -f more/data/result.txt ]] || false
|
||||
[[ -f data/xxx/A ]] || false
|
||||
[[ -f data/xxx/B ]] || false
|
||||
[[ -f data/xxx/C ]] || false
|
||||
|
||||
|
||||
#
|
||||
# one more time to make sure 'overwrite' is fine
|
||||
#
|
||||
echo Second run
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > my_combine'` == 1 ]] || false
|
||||
cmp stdout .expected || false
|
||||
|
||||
[[ -f data/alpha.bai ]] || false
|
||||
[[ -f data/alpha.bam ]] || false
|
||||
[[ -f data/beta.bai ]] || false
|
||||
[[ -f data/beta.bam ]] || false
|
||||
[[ -f data/delta.bai ]] || false
|
||||
[[ -f data/delta.bam ]] || false
|
||||
[[ -L data/result.txt ]] || false
|
||||
[[ -f more/data/result.txt ]] || false
|
||||
[[ -f data/xxx/A ]] || false
|
||||
[[ -f data/xxx/B ]] || false
|
||||
[[ -f data/xxx/C ]] || false
|
||||
|
||||
|
||||
#
|
||||
# clean & run resume mode
|
||||
#
|
||||
echo Third run
|
||||
rm -rf data
|
||||
rm -rf more/data
|
||||
|
||||
$NXF_RUN -resume | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Cached process > align'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Cached process > my_combine'` == 1 ]] || false
|
||||
cmp stdout .expected || false
|
||||
[[ -f data/alpha.bai ]] || false
|
||||
[[ -f data/alpha.bam ]] || false
|
||||
[[ -f data/beta.bai ]] || false
|
||||
[[ -f data/beta.bam ]] || false
|
||||
[[ -f data/delta.bai ]] || false
|
||||
[[ -f data/delta.bam ]] || false
|
||||
[[ -L data/result.txt ]] || false
|
||||
[[ -f more/data/result.txt ]] || false
|
||||
#
|
||||
# NOTE: on Mac when deleting an hard-link also the origin is removed
|
||||
#
|
||||
[[ -f data/xxx/A ]] || false
|
||||
[[ -f data/xxx/B ]] || false
|
||||
[[ -f data/xxx/C ]] || false
|
||||
|
||||
7
nextflow/tests-v1/checks/publish-dir.nf/.expected
Normal file
7
nextflow/tests-v1/checks/publish-dir.nf/.expected
Normal file
@@ -0,0 +1,7 @@
|
||||
alpha
|
||||
beta
|
||||
delta
|
||||
ahpla
|
||||
ateb
|
||||
atled
|
||||
|
||||
20
nextflow/tests-v1/checks/publish-nested.nf/.checks
Normal file
20
nextflow/tests-v1/checks/publish-nested.nf/.checks
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo First run
|
||||
$NXF_RUN --x ciao | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
|
||||
[[ $(cat data/a/b/c/file.txt) == ciao ]] || false
|
||||
|
||||
|
||||
#
|
||||
# second run, must overwrite the file
|
||||
#
|
||||
echo First run
|
||||
$NXF_RUN --x miao | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > foo'` == 1 ]] || false
|
||||
[[ $(cat data/a/b/c/file.txt) == miao ]] || false
|
||||
|
||||
|
||||
30
nextflow/tests-v1/checks/publish-s3-kms.nf/.checks
Normal file
30
nextflow/tests-v1/checks/publish-s3-kms.nf/.checks
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
BUCKET="nf-kms-xyz"
|
||||
PREFIX="work/ci-test/publish-s3/$(uuidgen)"
|
||||
OUTDIR="s3://$BUCKET/$PREFIX"
|
||||
|
||||
function check_kms_key() {
|
||||
aws s3api head-object --bucket "$BUCKET" --key "$PREFIX/HELLO.tsv" | grep -c e5109f93-b42d-4c26-89ee-8b251029a41d
|
||||
}
|
||||
|
||||
# Skip test if AWS keys are missing
|
||||
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
|
||||
echo "Missing AWS credentials -- Skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
$NXF_RUN -c .config --outdir "$OUTDIR" | tee .stdout
|
||||
[[ $(grep INFO .nextflow.log | grep -c 'Submitted process') == 1 ]] || false
|
||||
[[ $(check_kms_key) == 1 ]] || false
|
||||
|
||||
#
|
||||
# run resume mode
|
||||
#
|
||||
$NXF_RUN -c .config --outdir "$OUTDIR" -resume | tee .stdout
|
||||
[[ $(grep INFO .nextflow.log | grep -c 'Cached process') == 1 ]] || false
|
||||
[[ $(check_kms_key) == 1 ]] || false
|
||||
|
||||
2
nextflow/tests-v1/checks/publish-s3-kms.nf/.config
Normal file
2
nextflow/tests-v1/checks/publish-s3-kms.nf/.config
Normal file
@@ -0,0 +1,2 @@
|
||||
aws.client.storageEncryption = 'aws:kms'
|
||||
aws.client.storageKmsKeyId = 'arn:aws:kms:eu-west-1:195996028523:key/e5109f93-b42d-4c26-89ee-8b251029a41d'
|
||||
24
nextflow/tests-v1/checks/publish-s3.nf/.checks
Normal file
24
nextflow/tests-v1/checks/publish-s3.nf/.checks
Normal file
@@ -0,0 +1,24 @@
|
||||
function count_hello() {
|
||||
rm -rf hello
|
||||
aws s3 cp --only-show-errors s3://nextflow-ci/work/ci-test/publish-s3/HELLO.tsv hello && < hello grep 'Hello, world' -c
|
||||
}
|
||||
|
||||
# Skip test if AWS keys are missing
|
||||
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
|
||||
echo "Missing AWS credentials -- Skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
$NXF_RUN | tee .stdout
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 1 ]] || false
|
||||
|
||||
#
|
||||
# run resume mode
|
||||
#
|
||||
$NXF_RUN -resume | tee .stdout
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Cached process'` == 1 ]] || false
|
||||
|
||||
|
||||
11
nextflow/tests-v1/checks/publish-saveas.nf/.checks
Normal file
11
nextflow/tests-v1/checks/publish-saveas.nf/.checks
Normal file
@@ -0,0 +1,11 @@
|
||||
echo First run
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process'` == 3 ]] || false
|
||||
|
||||
[[ -f results/alpha/file_1.txt ]] || false
|
||||
[[ -f results/gamma/file_3.txt ]] || false
|
||||
|
||||
[[ ! -f results/file_2.txt ]] || false
|
||||
[[ ! -f results/alpha/file_2.txt ]] || false
|
||||
[[ ! -f results/gamma/file_2.txt ]] || false
|
||||
7
nextflow/tests-v1/checks/qrun.sh
Executable file
7
nextflow/tests-v1/checks/qrun.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
launch_cmd=../../launch.sh
|
||||
export NXF_ANSI_LOG=false
|
||||
export WITH_DOCKER=${WITH_DOCKER:=''}
|
||||
export NXF_CMD=$(realpath $launch_cmd)
|
||||
export TEST_JDK=17
|
||||
bash run.sh "$1"
|
||||
24
nextflow/tests-v1/checks/race.nf/.checks
Normal file
24
nextflow/tests-v1/checks/race.nf/.checks
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
$NXF_RUN
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc1'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc2'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc3'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc4'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc5'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc6'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > proc7'` == 3 ]] || false
|
||||
|
||||
|
||||
$NXF_RUN
|
||||
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc1'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc2'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc3'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc4'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc5'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc6'` == 3 ]] || false
|
||||
[[ `grep INFO .nextflow.log | grep -c '\[skipping\] Stored process > proc7'` == 3 ]] || false
|
||||
|
||||
58
nextflow/tests-v1/checks/repeaters.nf/.checks
Normal file
58
nextflow/tests-v1/checks/repeaters.nf/.checks
Normal file
@@ -0,0 +1,58 @@
|
||||
set -e
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > hola'` == 12 ]] || false
|
||||
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > foo'` == 2 ]] || false
|
||||
|
||||
grep 'x: 1; y: Ciao; z: alpha' stdout
|
||||
grep 'x: 1; y: Ciao; z: beta' stdout
|
||||
grep 'x: 1; y: Ciao; z: delta' stdout
|
||||
|
||||
grep 'x: 1; y: Hola; z: alpha' stdout
|
||||
grep 'x: 1; y: Hola; z: beta' stdout
|
||||
grep 'x: 1; y: Hola; z: delta' stdout
|
||||
|
||||
grep 'x: 2; y: Ciao; z: alpha' stdout
|
||||
grep 'x: 2; y: Ciao; z: beta' stdout
|
||||
grep 'x: 2; y: Ciao; z: delta' stdout
|
||||
|
||||
grep 'x: 2; y: Hola; z: alpha' stdout
|
||||
grep 'x: 2; y: Hola; z: beta' stdout
|
||||
grep 'x: 2; y: Hola; z: delta' stdout
|
||||
|
||||
grep -F 'foo [a, b]' stdout
|
||||
grep -F 'foo [c, d]' stdout
|
||||
|
||||
|
||||
#
|
||||
# RESUME mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN -resume | tee stdout
|
||||
|
||||
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > hola'` == 12 ]] || false
|
||||
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process > foo'` == 2 ]] || false
|
||||
|
||||
grep 'x: 1; y: Ciao; z: alpha' stdout
|
||||
grep 'x: 1; y: Ciao; z: beta' stdout
|
||||
grep 'x: 1; y: Ciao; z: delta' stdout
|
||||
|
||||
grep 'x: 1; y: Hola; z: alpha' stdout
|
||||
grep 'x: 1; y: Hola; z: beta' stdout
|
||||
grep 'x: 1; y: Hola; z: delta' stdout
|
||||
|
||||
grep 'x: 2; y: Ciao; z: alpha' stdout
|
||||
grep 'x: 2; y: Ciao; z: beta' stdout
|
||||
grep 'x: 2; y: Ciao; z: delta' stdout
|
||||
|
||||
grep 'x: 2; y: Hola; z: alpha' stdout
|
||||
grep 'x: 2; y: Hola; z: beta' stdout
|
||||
grep 'x: 2; y: Hola; z: delta' stdout
|
||||
|
||||
grep -F 'foo [a, b]' stdout
|
||||
grep -F 'foo [c, d]' stdout
|
||||
18
nextflow/tests-v1/checks/resume-retried-task.nf/.checks
Normal file
18
nextflow/tests-v1/checks/resume-retried-task.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
|
||||
[[ `< .nextflow.log grep -c 'Re-submitted process > foo'` == 2 ]] || false
|
||||
|
||||
#
|
||||
# RESUME mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN -resume | tee stdout
|
||||
|
||||
[[ `< .nextflow.log grep -c 'Cached process > foo'` == 1 ]] || false
|
||||
13
nextflow/tests-v1/checks/retry-ignore.nf/.checks
Normal file
13
nextflow/tests-v1/checks/retry-ignore.nf/.checks
Normal file
@@ -0,0 +1,13 @@
|
||||
set -e
|
||||
|
||||
#
|
||||
# run normal mode
|
||||
#
|
||||
echo ''
|
||||
$NXF_RUN | tee stdout
|
||||
|
||||
[[ `< .nextflow.log grep -c 'Submitted process > foo'` == 1 ]] || false
|
||||
[[ `< .nextflow.log grep -c 'Re-submitted process > foo'` == 1 ]] || false
|
||||
[[ `< .nextflow.log grep -c 'Error is ignored'` == 1 ]] || false
|
||||
|
||||
|
||||
100
nextflow/tests-v1/checks/run.sh
Executable file
100
nextflow/tests-v1/checks/run.sh
Executable file
@@ -0,0 +1,100 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
trap "exit" INT
|
||||
|
||||
NORMAL=$(tput sgr0)
|
||||
GREEN=$(tput setaf 2; tput bold)
|
||||
YELLOW=$(tput setaf 3)
|
||||
RED=$(tput setaf 1)
|
||||
|
||||
function echo_red() {
|
||||
echo -e "$RED$*$NORMAL"
|
||||
}
|
||||
|
||||
function echo_green() {
|
||||
echo -e "$GREEN$*$NORMAL"
|
||||
}
|
||||
|
||||
function echo_yellow() {
|
||||
echo -e "$YELLOW$*$NORMAL"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Some vars
|
||||
#
|
||||
NXF_CMD=${NXF_CMD:-nextflow}
|
||||
NXF_SYNTAX_PARSER=v1
|
||||
REPORT=$PWD/.report
|
||||
WITH_DOCKER=${WITH_DOCKER:=''}
|
||||
|
||||
#
|
||||
# Clean scratch dir
|
||||
#
|
||||
export NXF_WORK=$PWD/scratch
|
||||
rm -rf $NXF_WORK
|
||||
|
||||
|
||||
function run_checks() {
|
||||
NXF_SCRIPT="../../$1"
|
||||
NXF_RUN="$NXF_CMD -q run $NXF_SCRIPT"
|
||||
export NXF_SCRIPT
|
||||
export NXF_CMD
|
||||
export NXF_RUN
|
||||
set +e
|
||||
|
||||
if [ -f $1/.checks ]; then
|
||||
cd $basename;
|
||||
rm -rf *
|
||||
bash -ex .checks &> checks.out
|
||||
else
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
$NXF_RUN > checks.out
|
||||
fi
|
||||
|
||||
ret=$?
|
||||
set -e
|
||||
if [[ $ret != 0 ]]; then
|
||||
echo "~ Test '$1' run failed" >> $REPORT
|
||||
# dump error output
|
||||
[[ -s checks.out ]] && cat checks.out | sed 's/^/ /'>> $REPORT
|
||||
echo '' >> $REPORT
|
||||
# dump nextflow log file
|
||||
[[ -f .nextflow.log ]] && cat .nextflow.log >> $REPORT
|
||||
echo '' >> $REPORT
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
rm -rf $REPORT
|
||||
|
||||
list=${1:-'../*.nf'}
|
||||
|
||||
function can_run() {
|
||||
if [[ $(grep -c "$1" .PARSER-V1) != 0 ]]; then
|
||||
echo 'yes'
|
||||
else
|
||||
echo 'no'
|
||||
fi
|
||||
}
|
||||
|
||||
for x in $list; do
|
||||
basename=$(basename $x)
|
||||
if [[ $(can_run $basename) == 'yes' ]]; then
|
||||
echo "> Running test: $basename"
|
||||
( set -e;
|
||||
run_checks $basename
|
||||
)
|
||||
else
|
||||
echo "- Ignoring test: $basename"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -s $REPORT ]]; then
|
||||
echo -e "$RED"
|
||||
cat $REPORT
|
||||
echo -e "$NORMAL"
|
||||
exit 1
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user