@@ -372,35 +372,6 @@ ${summary.collect { k,v -> " <dt>$k</dt><dd><samp>${v ?: '<span style
372372}
373373
374374
375- /*
376- * Parse software version numbers
377- */
378- process get_software_versions {
379-
380- output:
381- file ' software_versions_mqc.yaml' into software_versions_yaml
382-
383- script:
384- """
385- echo $workflow . manifest . version &> v_pipeline.txt
386- echo $workflow . nextflow . version &> v_nextflow.txt
387- fastqc --version &> v_fastqc.txt 2>&1 || true
388- multiqc --version &> v_multiqc.txt 2>&1 || true
389- bwa &> v_bwa.txt 2>&1 || true
390- samtools --version &> v_samtools.txt 2>&1 || true
391- AdapterRemoval -version &> v_adapterremoval.txt 2>&1 || true
392- picard MarkDuplicates --version &> v_markduplicates.txt 2>&1 || true
393- dedup -v &> v_dedup.txt 2>&1 || true
394- preseq &> v_preseq.txt 2>&1 || true
395- gatk BaseRecalibrator --version 2>&1 | grep Version: > v_gatk.txt 2>&1 || true
396- vcf2genome &> v_vcf2genome.txt 2>&1 || true
397- fastp --version &> v_fastp.txt 2>&1 || true
398- bam --version &> v_bamutil.txt 2>&1 || true
399- qualimap --version &> v_qualimap.txt 2>&1 || true
400-
401- scrape_software_versions.py &> software_versions_mqc.yaml
402- """
403- }
404375
405376/*
406377* Create BWA indices if they are not present
@@ -615,7 +586,7 @@ process bwa {
615586
616587 output:
617588 file " *.sorted.bam" into ch_mapped_reads_idxstats,ch_mapped_reads_filter,ch_mapped_reads_preseq, ch_mapped_reads_damageprofiler
618- file " *.bai"
589+ file " *.bai" into ch_bam_index_for_damageprofiler
619590
620591
621592 script:
@@ -868,9 +839,12 @@ process damageprofiler {
868839 input:
869840 file bam from ch_mapped_reads_damageprofiler. mix(ch_mapped_reads_damageprofiler_cm,ch_bwamem_mapped_reads_damageprofiler)
870841 file fasta from ch_fasta_for_damageprofiler
842+ file bai from ch_bam_index_for_damageprofiler
843+
871844
872845 output:
873- file " *.json" into ch_damageprofiler_results
846+ file " *"
847+ file " */*.json" into ch_damageprofiler_results, ch_damageprofiler_for_software_versions
874848
875849 script:
876850 """
@@ -1029,6 +1003,63 @@ Downstream VCF tools:
10291003
10301004
10311005
1006+
1007+
1008+
1009+ /*
1010+ * STEP 3 - Output Description HTML
1011+ */
1012+ process output_documentation {
1013+ publishDir " ${ params.outdir} /Documentation" , mode: ' copy'
1014+
1015+ input:
1016+ file output_docs from ch_output_docs
1017+
1018+ output:
1019+ file " results_description.html"
1020+
1021+ script:
1022+ """
1023+ markdown_to_html.r $output_docs results_description.html
1024+ """
1025+ }
1026+
1027+
1028+ /*
1029+ * Parse software version numbers
1030+ */
1031+ process get_software_versions {
1032+
1033+ input:
1034+ file json from ch_damageprofiler_for_software_versions
1035+
1036+ output:
1037+ file ' software_versions_mqc.yaml' into software_versions_yaml
1038+
1039+ script:
1040+ """
1041+ echo $workflow . manifest . version &> v_pipeline.txt
1042+ echo $workflow . nextflow . version &> v_nextflow.txt
1043+ fastqc --version &> v_fastqc.txt 2>&1 || true
1044+ multiqc --version &> v_multiqc.txt 2>&1 || true
1045+ bwa &> v_bwa.txt 2>&1 || true
1046+ samtools --version &> v_samtools.txt 2>&1 || true
1047+ AdapterRemoval -version &> v_adapterremoval.txt 2>&1 || true
1048+ picard MarkDuplicates --version &> v_markduplicates.txt 2>&1 || true
1049+ dedup -v &> v_dedup.txt 2>&1 || true
1050+ preseq &> v_preseq.txt 2>&1 || true
1051+ gatk BaseRecalibrator --version 2>&1 | grep Version: > v_gatk.txt 2>&1 || true
1052+ vcf2genome &> v_vcf2genome.txt 2>&1 || true
1053+ fastp --version &> v_fastp.txt 2>&1 || true
1054+ bam --version &> v_bamutil.txt 2>&1 || true
1055+ qualimap --version &> v_qualimap.txt 2>&1 || true
1056+ cat $json &> v_damageprofiler.txt 2>&1 || true
1057+
1058+ scrape_software_versions.py &> software_versions_mqc.yaml
1059+ """
1060+ }
1061+
1062+
10321063/*
10331064 * STEP 2 - MultiQC
10341065 */
@@ -1065,26 +1096,6 @@ process multiqc {
10651096
10661097
10671098
1068- /*
1069- * STEP 3 - Output Description HTML
1070- */
1071- process output_documentation {
1072- publishDir " ${ params.outdir} /Documentation" , mode: ' copy'
1073-
1074- input:
1075- file output_docs from ch_output_docs
1076-
1077- output:
1078- file " results_description.html"
1079-
1080- script:
1081- """
1082- markdown_to_html.r $output_docs results_description.html
1083- """
1084- }
1085-
1086-
1087-
10881099
10891100/*
10901101 * Completion e-mail notification
0 commit comments