Skip to content
Snippets Groups Projects
Verified Commit 81a9ff87 authored by Mia Croiset's avatar Mia Croiset
Browse files

add hicstuff versions

parent 120ff50f
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ process BOWTIE2_ALIGNMENT { ...@@ -13,6 +13,7 @@ process BOWTIE2_ALIGNMENT {
output: output:
tuple val(meta), path ("*.bam"), emit: bam tuple val(meta), path ("*.bam"), emit: bam
path "versions.yml", emit: versions
script: script:
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
...@@ -26,6 +27,13 @@ process BOWTIE2_ALIGNMENT { ...@@ -26,6 +27,13 @@ process BOWTIE2_ALIGNMENT {
bowtie2 $args -p $task.cpus -x \$INDEX -U $reads > ${prefix}.tmp bowtie2 $args -p $task.cpus -x \$INDEX -U $reads > ${prefix}.tmp
samtools view -F 2048 -h -@ $task.cpus ${prefix}.tmp | samtools sort -n -@ $task.cpus -o ${prefix}.bam - samtools view -F 2048 -h -@ $task.cpus ${prefix}.tmp | samtools sort -n -@ $task.cpus -o ${prefix}.bam -
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
""" """
} }
...@@ -13,6 +13,7 @@ process FRAGMENT_ENZYME { ...@@ -13,6 +13,7 @@ process FRAGMENT_ENZYME {
tuple val(meta), path(params.hicstuff_output_contigs) , emit: info_contigs tuple val(meta), path(params.hicstuff_output_contigs) , emit: info_contigs
tuple val(meta), path(params.hicstuff_output_frags), emit: fragments_list tuple val(meta), path(params.hicstuff_output_frags), emit: fragments_list
path("*.pdf"), optional: true path("*.pdf"), optional: true
path "versions.yml", emit: versions
script: script:
...@@ -20,6 +21,11 @@ process FRAGMENT_ENZYME { ...@@ -20,6 +21,11 @@ process FRAGMENT_ENZYME {
""" """
hicstuff_fragments.py -e ${digestion} -i ${fasta} ${args} hicstuff_fragments.py -e ${digestion} -i ${fasta} ${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hicstuff: v3.1.3)
END_VERSIONS
""" """
} }
...@@ -42,6 +42,7 @@ workflow HICSTUFF { ...@@ -42,6 +42,7 @@ workflow HICSTUFF {
chromosome_size chromosome_size
main: main:
ch_versions = Channel.empty()
// Align each mates separetly and add mates information in [meta] // Align each mates separetly and add mates information in [meta]
ch_reads_r1 = reads.map{ it -> pairToSingle(it,"R1") } ch_reads_r1 = reads.map{ it -> pairToSingle(it,"R1") }
...@@ -52,11 +53,13 @@ workflow HICSTUFF { ...@@ -52,11 +53,13 @@ workflow HICSTUFF {
ch_reads, ch_reads,
index.collect() index.collect()
) )
ch_versions = ch_versions.mix(BOWTIE2_ALIGNMENT.out.versions)
FRAGMENT_ENZYME( FRAGMENT_ENZYME(
digestion, digestion,
fasta fasta
) )
ch_versions = ch_versions.mix(FRAGMENT_ENZYME.out.versions)
if (params.filter_pcr && params.filter_pcr_picard ){ if (params.filter_pcr && params.filter_pcr_picard ){
error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file" error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file"
...@@ -68,6 +71,7 @@ workflow HICSTUFF { ...@@ -68,6 +71,7 @@ workflow HICSTUFF {
index index
) )
FILTER_PCR_DUP.out.bam.set{ new_ch_bam } FILTER_PCR_DUP.out.bam.set{ new_ch_bam }
ch_versions = ch_versions.mix(FILTER_PCR_DUP.out.versions)
} }
else { else {
...@@ -130,4 +134,5 @@ workflow HICSTUFF { ...@@ -130,4 +134,5 @@ workflow HICSTUFF {
emit: emit:
cool = BUILD_MATRIX_COOL_ALT.out.matrix cool = BUILD_MATRIX_COOL_ALT.out.matrix
versions = ch_versions
} }
...@@ -230,6 +230,7 @@ workflow HIC { ...@@ -230,6 +230,7 @@ workflow HIC {
) )
ch_cool = HICSTUFF.out.cool ch_cool = HICSTUFF.out.cool
ch_mqc = Channel.empty() ch_mqc = Channel.empty()
ch_versions = ch_versions.mix(HICSTUFF.out.versions)
} }
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment