From 2a991dc630a3f180d4745772bb55b13280916802 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Wed, 22 Aug 2018 14:19:57 +0200
Subject: [PATCH] BEDtools: update nf structure

---
 ...{bedtools.config => fasta_from_bed.config} |  0
 .../{bedtools.nf => fasta_from_bed.nf}        |  0
 src/nf_modules/BEDtools/{tests => }/tests.sh  |  4 +--
 .../BEDtools/tests/fasta_from_bed.nf          | 33 -------------------
 4 files changed, 2 insertions(+), 35 deletions(-)
 rename src/nf_modules/BEDtools/{bedtools.config => fasta_from_bed.config} (100%)
 rename src/nf_modules/BEDtools/{bedtools.nf => fasta_from_bed.nf} (100%)
 rename src/nf_modules/BEDtools/{tests => }/tests.sh (52%)
 delete mode 100644 src/nf_modules/BEDtools/tests/fasta_from_bed.nf

diff --git a/src/nf_modules/BEDtools/bedtools.config b/src/nf_modules/BEDtools/fasta_from_bed.config
similarity index 100%
rename from src/nf_modules/BEDtools/bedtools.config
rename to src/nf_modules/BEDtools/fasta_from_bed.config
diff --git a/src/nf_modules/BEDtools/bedtools.nf b/src/nf_modules/BEDtools/fasta_from_bed.nf
similarity index 100%
rename from src/nf_modules/BEDtools/bedtools.nf
rename to src/nf_modules/BEDtools/fasta_from_bed.nf
diff --git a/src/nf_modules/BEDtools/tests/tests.sh b/src/nf_modules/BEDtools/tests.sh
similarity index 52%
rename from src/nf_modules/BEDtools/tests/tests.sh
rename to src/nf_modules/BEDtools/tests.sh
index f27c274..4d6bda0 100755
--- a/src/nf_modules/BEDtools/tests/tests.sh
+++ b/src/nf_modules/BEDtools/tests.sh
@@ -1,5 +1,5 @@
-nextflow src/nf_modules/BEDtools/tests/fasta_from_bed.nf \
-  -c src/nf_modules/BEDtools/bedtools.config \
+nextflow src/nf_modules/BEDtools/fasta_from_bed.nf \
+  -c src/nf_modules/BEDtools/fasta_from_bed.config \
   -profile docker \
   --fasta "data/tiny_dataset/fasta/tiny_v2.fasta" \
   --bed "data/tiny_dataset/annot/tiny.bed" \
diff --git a/src/nf_modules/BEDtools/tests/fasta_from_bed.nf b/src/nf_modules/BEDtools/tests/fasta_from_bed.nf
deleted file mode 100644
index 372f89e..0000000
--- a/src/nf_modules/BEDtools/tests/fasta_from_bed.nf
+++ /dev/null
@@ -1,33 +0,0 @@
-params.fastq = "$baseDir/data/fasta/*.fasta"
-params.bed = "$baseDir/data/annot/*.bed"
-
-log.info "fasta file : ${params.fasta}"
-log.info "bed file : ${params.bed}"
-
-Channel
-  .fromPath( params.fasta )
-  .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
-  .set { fasta_files }
-Channel
-  .fromPath( params.bed )
-  .ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
-  .set { bed_files }
-
-process fasta_from_bed {
-  tag "${bed.baseName}"
-  cpus 4
-  publishDir "results/fasta/", mode: 'copy'
-
-  input:
-  file fasta from fasta_files
-  file bed from bed_files
-
-  output:
-  file "*_extracted.fasta" into fasta_files_extracted
-
-  script:
-"""
-bedtools getfasta -name \
--fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
-"""
-}
-- 
GitLab