Skip to content

Commit

Permalink
added conda; bed input
Browse files Browse the repository at this point in the history
  • Loading branch information
renewiegandt committed Dec 3, 2018
1 parent 8a369df commit 476df0c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pipeline.nf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -59,6 +63,7 @@ process overlap_with_known_TFBS {


process clustering {
conda "${path_env}"

input:
file (fasta) from FASTA_for_clustering
Expand All @@ -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'
Expand All @@ -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}

Expand All @@ -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}

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -211,6 +221,7 @@ process cluster_quality {


process create_GTF {
conda "${path_env}"

output:
file ('*.gtf') into gtf_for_uropa
Expand Down

0 comments on commit 476df0c

Please sign in to comment.