From 476df0c8ac80ce971598273114311fa3f482e5d9 Mon Sep 17 00:00:00 2001 From: renewiegandt Date: Mon, 3 Dec 2018 14:47:32 +0100 Subject: [PATCH] added conda; bed input --- pipeline.nf | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pipeline.nf b/pipeline.nf index e4d502f..548db47 100644 --- a/pipeline.nf +++ b/pipeline.nf @@ -1,30 +1,33 @@ //!/usr/bin/env nextflow Channel.fromPath(params.input).map {it -> [it.simpleName, it]}.set {bigwig_input} +Channel.fromPath(params.bed).set {bed_input} Channel.fromPath(params.genome_fasta).into {fa_overlap; fa_scan; fa_overlap_2} Channel.fromPath(params.jaspar_db).into {db_for_motivscan; db_for_tomtom} Channel.fromPath(params.config).set {config} -params.min_seq = 10 +bigwig_input.combine(bed_input).set{footprint_in} process footprint_extraction { + conda "${path_env}" tag{name} input: - set name, file (bigWig) from bigwig_input + set name, file (bigWig), file (bed) from footprint_in output: set name, file ('*.bed') into bed_for_overlap_with_TFBS script: """ - python ${path_bin}/call_peaks.py --bigwig ${bigWig} --bed ${bed} --output_file ${name}_called_peaks.bed --window_length ${params.window_length} --step ${params.step} --threshold ${params.threshold_footprint_extraction} + python ${path_bin}/call_peaks.py --bigwig ${bigWig} --bed ${bed} --output_file ${name}_called_peaks.bed --window_length ${params.window_length} --step ${params.step} --percentage ${params.percentage} """ } //Abfrage ob ausgeführt werden muss. process extract_known_TFBS { + conda "${path_env}" input: file (fasta) from fa_overlap @@ -43,6 +46,7 @@ bed_for_overlap_with_TFBS.combine(known_TFBS_for_overlap).combine(fa_overlap_2). process overlap_with_known_TFBS { + conda "${path_env}" input: set file (bed_footprints), file (bed_motifs), file (fasta) from for_overlap @@ -59,6 +63,7 @@ process overlap_with_known_TFBS { process clustering { + conda "${path_env}" input: file (fasta) from FASTA_for_clustering @@ -74,6 +79,7 @@ process clustering { // Converting BED-File to one FASTA-File per cluster process bed_to_clustered_fasta { + conda "${path_env}" tag{name} publishDir '/mnt/agnerds/Rene.Wiegandt/10_Master/tmp/', mode: 'copy' @@ -98,6 +104,7 @@ fasta_for_glam2 = fasta_for_glam2.flatten().map {it -> [it.simpleName, it]} //Running GLAM2 on FASTA-files. //Generating Motifs through alignment and scoring best local matches. process glam2 { + conda "${path_env}" tag{name} @@ -117,6 +124,7 @@ process glam2 { //Running Tomtom on meme-files generated by GLAM2. //Tomtom searches motifs in databases. process tomtom { + conda "${path_env}" tag{name} @@ -165,6 +173,7 @@ process check_for_unknown_motifs { //Get the best(first) Motif from each MEME-file process get_best_motif { + conda "${path_env}" input: set name, file(meme), file(tsv) from meme_for_scan @@ -183,6 +192,7 @@ best_motif.combine(fa_scan).set {files_for_genome_scan} process genome_scan { + conda "${path_env}" input: set name, file(meme), file(fasta) from files_for_genome_scan @@ -211,6 +221,7 @@ process cluster_quality { process create_GTF { + conda "${path_env}" output: file ('*.gtf') into gtf_for_uropa