diff --git a/pipeline.nf b/pipeline.nf index af27a1f..4ebab19 100644 --- a/pipeline.nf +++ b/pipeline.nf @@ -189,7 +189,7 @@ bigwig_input.combine(bed_input).set{footprint_in} This process uses the uncontinuous score from a bigWig file to estimate footpints within peaks of interest */ process footprint_extraction { - conda "${path_env}" + //conda "${path_env}" tag{name} publishDir "${params.out}/1.1_footprint_extraction/", mode: 'copy', pattern: '*.bed' @@ -214,7 +214,7 @@ for_tfbs = fa_overlap.combine(db_for_motivscan).combine(bed_for_tfbsscan) */ process extract_known_TFBS { - conda "${path_env}" + //conda "${path_env}" publishDir "${params.out}/1.2_filter_motifs/TFBSscan/", mode: 'copy', pattern: '*.bed' @@ -250,7 +250,7 @@ if(params.tfbs_path == "") { /* */ process overlap_with_known_TFBS { - conda "${path_env}" + //conda "${path_env}" publishDir "${params.out}/1.2_filter_motifs/compareBed/", mode :'copy' input: @@ -272,8 +272,8 @@ process overlap_with_known_TFBS { Reduce each sequence to its most conserved region. */ process reduce_sequence { - conda "${path_env}" - echo true + //conda "${path_env}" + publishDir "${params.out}/2.1_clustering/reduced_bed/", mode: 'copy' input: @@ -293,7 +293,7 @@ process reduce_sequence { Cluster all sequences. Appends a column with cluster numbers to the bed-file. */ process clustering { - conda "${path_env}" + //conda "${path_env}" echo true publishDir "${params.out}/2.1_clustering/", mode: 'copy', pattern: '*.bed' @@ -316,7 +316,7 @@ Converting BED-File to one FASTA-File per cluster */ process bed_to_clustered_fasta { - conda "${path_env}" + //conda "${path_env}" publishDir "${params.out}/2.2_motif_estimation/fasta/", mode: 'copy' tag{name} @@ -347,7 +347,7 @@ process glam2 { tag{name} publishDir "${params.out}/2.2_motif_estimation/glam2/", mode: 'copy' - conda "${path_env}" + //conda "${path_env}" input: set name, file (fasta) from fasta_for_glam2 @@ -373,7 +373,7 @@ The paths are sorted numerically depending on the cluster ID. process merge_meme { publishDir "${params.out}/2.2_motif_estimation/cluster_motifs/merged_meme/", mode: 'copy' - conda "${path_env}" + //conda "${path_env}" input: val (memelist) from meme_to_merge.toList() @@ -406,7 +406,7 @@ process find_similar_motifs { tag{name} publishDir "${params.out}/2.2_motif_estimation/cluster_motifs/cluster_similarity/", mode: 'copy' - conda "${path_env}" + //conda "${path_env}" input: set name, file (meme) ,file (merged_meme) from to_find_similar_motifs @@ -429,7 +429,7 @@ Label first column of TSV-file with Cluster ID process label_cluster { tag{name} - conda "${path_env}" + //conda "${path_env}" input: set name, file (tsv) from motif_similarity @@ -480,7 +480,7 @@ Merging FASTA-files of similar clusters */ process merge_fasta { - conda "${path_env}" + //conda "${path_env}" publishDir "${params.out}/2.2_motif_estimation/cluster_motifs/merged_fasta/", mode: 'copy' input: @@ -511,7 +511,7 @@ process clustered_glam2 { publishDir "${params.out}/2.2_motif_estimation/cluster_motifs/glam2/", mode: 'copy' tag{name} - conda "${path_env}" + //conda "${path_env}" input: file (fasta) from motif_clustered_fasta_flat @@ -555,7 +555,7 @@ process tomtom { tag{name} publishDir "${params.out}/2.2_motif_estimation/tomtom/", mode: 'copy' - conda "${path_env}" + //conda "${path_env}" input: set name, file (meme) from for_tomtom @@ -601,7 +601,7 @@ process check_for_unknown_motifs { //Get the best (first) X Motifs from each MEME-file process get_best_motif { - conda "${path_env}" + //conda "${path_env}" tag{name} publishDir "${params.out}/2.2_motif_estimation/best_unknown_motifs/", mode: 'copy' @@ -612,27 +612,29 @@ process get_best_motif { set name, file('*_best.meme') into best_motif script: + cluster_id = name.split('_')[-1] """ - python ${path_bin}/2.2_motif_estimation/get_best_motif.py ${meme} ${name}_best.meme ${params.best_motif} + python ${path_bin}/2.2_motif_estimation/get_best_motif.py ${meme} ${name}_best.meme ${params.best_motif} ${cluster_id} """ } process get_best_motif_seq { - conda "${path_env}" + //conda "${path_env}" tag{name} publishDir "${params.out}/2.2_motif_estimation/best_unknown_motifs/motif_sequences/", mode: 'copy' input: - set name, file(txt) from seq_to_json + set name, file (txt) from seq_to_json output: - file('*.json') + file("${name}_seq.json") script: + cluster_id = name.split('_')[-1] """ - Rscript ${path_bin}/2.2_motif_estimation/ get_motif_seq.R -i ${txt} -o ${name}_seq.json -n ${þærams.best_motif} + Rscript ${path_bin}/2.2_motif_estimation/get_motif_seq.R -i ${txt} -o ${name}_seq.json -n ${params.best_motif} -t ${path_bin}/2.2_motif_estimation/tmp/cluster_${cluster_id} -c ${cluster_id} """ } @@ -641,7 +643,7 @@ best_motif.combine(fa_scan).set {files_for_genome_scan} /* process genome_scan { - conda "${path_env}" + //conda "${path_env}" input: set name, file(meme), file(fasta) from files_for_genome_scan @@ -670,7 +672,7 @@ process cluster_quality { process create_GTF { - conda "${path_env}" + //conda "${path_env}" publishDir "${params.out}/3.1_create_gtf/", mode: 'copy'