-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure multiqc to extract and display gfastats results of each tan…
…tan, windowmasker, repeatmasker.
- Loading branch information
Showing
3 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
process CUSTOMMODULE { | ||
label 'process_single' | ||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/jq:1.6': | ||
'biocontainers/jq:1.6' }" | ||
|
||
|
||
input: | ||
path (assemt) | ||
path (assemw) | ||
path (assemr) | ||
|
||
output: | ||
path "*_mqc.tsv", emit: tsv | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
""" | ||
echo "# id: 'tantan repeat summary'" > tantanmqc_mqc.tsv | ||
echo "# section_name: 'tantan repeat masking summary statistics'" >> tantanmqc_mqc.tsv | ||
echo "# format: 'tsv'" >> tantanmqc_mqc.tsv | ||
echo "# plot_type: 'heatmap'" >> tantanmqc_mqc.tsv | ||
echo "# description: 'This plot shows a brief summary of each genomes whose repeats has been masked'" >> tantanmqc_mqc.tsv | ||
echo "# pconfig:" >> tantanmqc_mqc.tsv | ||
echo "# id: 'tantan repeat summary'" >> tantanmqc_mqc.tsv | ||
echo "# title: 'tantan repeat summary'" >> tantanmqc_mqc.tsv | ||
echo "# ylab: ''" >> tantanmqc_mqc.tsv | ||
echo "id\tTotal scaffold length\tTotal contig length\tsoft masked bases" >> tantanmqc_mqc.tsv | ||
for i in $assemt | ||
do | ||
printf "\$(basename \$i .assembly_summary)\t" >>tantanmqc_mqc.tsv | ||
grep 'Total scaffold length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> tantanmqc_mqc.tsv | ||
grep 'Total contig length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> tantanmqc_mqc.tsv | ||
grep 'soft-masked bases' \$i | tail -n 1 | awk '{print \$4}' >> tantanmqc_mqc.tsv | ||
done | ||
echo "# id: 'windowmasker repeat summary'" > windowmqc_mqc.tsv | ||
echo "# section_name: 'windowmasker repeat masking summary statistics'" >> windowmqc_mqc.tsv | ||
echo "# format: 'tsv'" >> windowmqc_mqc.tsv | ||
echo "# plot_type: 'heatmap'" >> windowmqc_mqc.tsv | ||
echo "# description: 'This plot shows a brief summary of each genomes whose repeats has been masked'" >> windowmqc_mqc.tsv | ||
echo "# pconfig:" >> windowmqc_mqc.tsv | ||
echo "# id: 'windowmasker repeat summary'" >> windowmqc_mqc.tsv | ||
echo "# title: 'windowmasker repeat summary'" >> windowmqc_mqc.tsv | ||
echo "# ylab: ''" >> windowmqc_mqc.tsv | ||
echo "id\tTotal scaffold length\tTotal contig length\tsoft masked bases" >> windowmqc_mqc.tsv | ||
for i in $assemw | ||
do | ||
printf "\$(basename \$i .assembly_summary)\t" >> windowmqc_mqc.tsv | ||
grep 'Total scaffold length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> windowmqc_mqc.tsv | ||
grep 'Total contig length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> windowmqc_mqc.tsv | ||
grep 'soft-masked bases' \$i | tail -n 1 | awk '{print \$4}' >> windowmqc_mqc.tsv | ||
done | ||
echo "# id: 'repeatmasker repeat summary'" > repeatmaskmqc_mqc.tsv | ||
echo "# section_name: 'repeatmasker repeat masking summary statistics'" >> repeatmaskmqc_mqc.tsv | ||
echo "# format: 'tsv'" >> repeatmaskmqc_mqc.tsv | ||
echo "# plot_type: 'heatmap'" >> repeatmaskmqc_mqc.tsv | ||
echo "# description: 'This plot shows a brief summary of each genomes whose repeats has been masked'" >> repeatmaskmqc_mqc.tsv | ||
echo "# pconfig:" >> repeatmaskmqc_mqc.tsv | ||
echo "# id: 'repeatmasker repeat summary'" >> repeatmaskmqc_mqc.tsv | ||
echo "# title: 'repeatmasker repeat summary'" >> repeatmaskmqc_mqc.tsv | ||
echo "# ylab: ''" >> repeatmaskmqc_mqc.tsv | ||
echo "id\tTotal scaffold length\tTotal contig length\tsoft masked bases" >> repeatmaskmqc_mqc.tsv | ||
for i in $assemr | ||
do | ||
printf "\$(basename \$i .assembly_summary)\t" >> repeatmaskmqc_mqc.tsv | ||
grep 'Total scaffold length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> repeatmaskmqc_mqc.tsv | ||
grep 'Total contig length' \$i | tail -n 1 | awk '{print \$4}' | tr '\n' '\t' >> repeatmaskmqc_mqc.tsv | ||
grep 'soft-masked bases' \$i | tail -n 1 | awk '{print \$4}' >> repeatmaskmqc_mqc.tsv | ||
done | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters