From 52bcfac9596485e12bd5f222bd54c99d53c872f8 Mon Sep 17 00:00:00 2001 From: Charles Plessy Date: Thu, 18 Jul 2024 11:43:34 +0900 Subject: [PATCH] Combine two reports, plus minor changes. --- modules/local/custommodule.nf | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/modules/local/custommodule.nf b/modules/local/custommodule.nf index d3345be..d8dee21 100644 --- a/modules/local/custommodule.nf +++ b/modules/local/custommodule.nf @@ -18,8 +18,8 @@ process CUSTOMMODULE { script: def args = task.ext.args ?: '' """ - echo "# id: 'base content summary'" > gc_summary_mqc.tsv - echo "# section_name: 'base and contigs summary statistics'" >> gc_summary_mqc.tsv + echo "# id: 'base_content_summary'" > gc_summary_mqc.tsv + echo "# section_name: 'Base frequency'" >> gc_summary_mqc.tsv echo "# format: 'tsv'" >> gc_summary_mqc.tsv echo "# plot_type: 'bargraph'" >> gc_summary_mqc.tsv echo "# description: 'This plot shows a brief summary of each base content/percentage in the query genomes'" >> gc_summary_mqc.tsv @@ -34,37 +34,20 @@ process CUSTOMMODULE { jq -r '[.contig_percent_a, .contig_percent_c, .contig_percent_g, .contig_percent_t, .contig_percent_n, .contig_non_acgtn] | @tsv' \$i >> gc_summary_mqc.tsv done - echo "# id: 'contigs length statistics'" > contig_length_mqc.tsv - echo "# section_name: 'base and contigs summary statistics'" >> contig_length_mqc.tsv + echo "# id: 'contigs_length_statistics'" > contig_length_mqc.tsv + echo "# section_name: 'Contig length statistics'" >> contig_length_mqc.tsv echo "# format: 'tsv'" >> contig_length_mqc.tsv - echo "# plot_type: 'heatmap'" >> contig_length_mqc.tsv + echo "# plot_type: 'table'" >> contig_length_mqc.tsv echo "# description: 'This plot shows a short statistics abouth the length of contigs in the query genomes'" >> contig_length_mqc.tsv echo "# pconfig:" >> contig_length_mqc.tsv echo "# id: 'contigs length statistics'" >> contig_length_mqc.tsv echo "# title: 'contigs length statistics'" >> contig_length_mqc.tsv echo "# ylab: 'length'" >> contig_length_mqc.tsv - echo "id\tTOTALcontiglen\tMINcontiglen\tMAXcontiglen" >> contig_length_mqc.tsv + echo "id\tTOTALcontiglen\tMINcontiglen\tMAXcontiglen\ttotalcontigs\tcontigs>1k\tcontigs>10k" >> contig_length_mqc.tsv for i in $json do printf "\$(basename \$i .json)\t" >> contig_length_mqc.tsv - jq -r '[.total_contig_length, .min_contig_length, .max_contig_length] | @tsv' \$i >> contig_length_mqc.tsv - done - - echo "# id: 'contigs number'" > contig_total_mqc.tsv - echo "# section_name: 'base and contigs summary statistics'" >> contig_total_mqc.tsv - echo "# format: 'tsv'" >> contig_total_mqc.tsv - echo "# plot_type: 'heatmap'" >> contig_total_mqc.tsv - echo "# id: 'contigs length statistics'" >> contig_length_mqc.tsv - echo "# description: 'This plot shows the total number of contigs in each test with threshold length'" >> contig_total_mqc.tsv - echo "# pconfig:" >> contig_total_mqc.tsv - echo "# id: 'number of contigs'" >> contig_total_mqc.tsv - echo "# title: 'number of contigs'" >> contig_total_mqc.tsv - echo "# ylab: 'number'" >> contig_total_mqc.tsv - echo "id\ttotalcontigs\tcontigs>1k\tcontigs>10k" >> contig_total_mqc.tsv - for i in $json - do - printf "\$(basename \$i .json)\t" >> contig_total_mqc.tsv - jq -r '[.total_contig, .contigs_greater_1k, .contigs_greater_10k] | @tsv' \$i >> contig_total_mqc.tsv + jq -r '[.total_contig_length, .min_contig_length, .max_contig_length, .total_contig, .contigs_greater_1k, .contigs_greater_10k] | @tsv' \$i >> contig_length_mqc.tsv done """ }