forked from U13bs1125/pairgenomealign_windowmask
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report on softmask overlaps, and rename softmask stats local module.
- Loading branch information
1 parent
61f5adc
commit 2778d59
Showing
3 changed files
with
60 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
process MULTIQC_SOFTMASK_OVERLAPS { | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/bedtools:2.31.1--hf5e1c6e_0' : | ||
'biocontainers/bedtools:2.31.1--hf5e1c6e_0' }" | ||
|
||
// Recycling bedtools image as we already use it elsewhere | ||
|
||
input: | ||
path (files) | ||
|
||
output: | ||
path "*_mqc.tsv", emit: tsv | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
""" | ||
# Summarise Jaccard indexes for MultiQC | ||
echo "# id: 'Jaccard indexes'" > jaccard_indexes_mqc.tsv | ||
echo "# section_name: 'Repeat masking overlap statistics'" >> jaccard_indexes_mqc.tsv | ||
echo "# format: 'tsv'" >> jaccard_indexes_mqc.tsv | ||
echo "# plot_type: 'table'" >> jaccard_indexes_mqc.tsv | ||
echo "# description: 'This plot shows a brief summary of the overlaps between the soft masks generated by each process'" >> jaccard_indexes_mqc.tsv | ||
echo "# pconfig:" >> jaccard_indexes_mqc.tsv | ||
echo "# id: 'Jaccard indexes'" >> jaccard_indexes_mqc.tsv | ||
echo "# title: 'Jaccard indexes'" >> jaccard_indexes_mqc.tsv | ||
echo "# ylab: ''" >> jaccard_indexes_mqc.tsv | ||
echo "id\ttantan–WindowMasker\ttantan–RepeatMasker\tWindowMasker–RepeatMasker" >> jaccard_indexes_mqc.tsv | ||
# Here we loop on samples | ||
for SAMPLE in \$(basename -s _tantan_windowmasker_jaccard.txt *_tantan_windowmasker_jaccard.txt) | ||
do | ||
printf "\${SAMPLE}\t" >> jaccard_indexes_mqc.tsv | ||
sed -n 2p \${SAMPLE}_tantan_windowmasker_jaccard.txt | awk '{printf \$3"\t"}' >> jaccard_indexes_mqc.tsv | ||
sed -n 2p \${SAMPLE}_tantan_repeatmasker_jaccard.txt | awk '{printf \$3"\t"}' >> jaccard_indexes_mqc.tsv | ||
sed -n 2p \${SAMPLE}_repeatmasker_windowmasker_jaccard.txt | awk '{printf \$3 }' >> jaccard_indexes_mqc.tsv | ||
printf '\n' >> jaccard_indexes_mqc.tsv | ||
done | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") | ||
END_VERSIONS | ||
""" | ||
} |
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