From a56b851c6f95bee0168914ca752cc90bf5596be4 Mon Sep 17 00:00:00 2001
From: mherbett <marion.herbette@ens-lyon.fr>
Date: Wed, 6 Jun 2018 13:26:14 +0000
Subject: [PATCH] fasta_sampler : output file dependent of the name of the
 input file

---
 src/fasta_sampler.nf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/fasta_sampler.nf b/src/fasta_sampler.nf
index 9dfcb12..31787d4 100644
--- a/src/fasta_sampler.nf
+++ b/src/fasta_sampler.nf
@@ -7,10 +7,10 @@ process sample_fasta {
 file fasta from fasta_file
 
   output:
-file "sample.fasta" into fasta_sample
+file "*_sample.fasta" into fasta_sample
 
   script:
 """
-head ${fasta} > sample.fasta
+head ${fasta} > ${fasta.baseName}_sample.fasta
 """
-}
+
-- 
GitLab