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

add hicstuff versions

parent 120ff50f
Branches
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ process BOWTIE2_ALIGNMENT {
output:
tuple val(meta), path ("*.bam"), emit: bam
path "versions.yml", emit: versions
script:
def prefix = task.ext.prefix ?: "${meta.id}"
......@@ -26,6 +27,13 @@ process BOWTIE2_ALIGNMENT {
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 -
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 {
tuple val(meta), path(params.hicstuff_output_contigs) , emit: info_contigs
tuple val(meta), path(params.hicstuff_output_frags), emit: fragments_list
path("*.pdf"), optional: true
path "versions.yml", emit: versions
script:
......@@ -20,6 +21,11 @@ process FRAGMENT_ENZYME {
"""
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 {
chromosome_size
main:
ch_versions = Channel.empty()
// Align each mates separetly and add mates information in [meta]
ch_reads_r1 = reads.map{ it -> pairToSingle(it,"R1") }
......@@ -52,11 +53,13 @@ workflow HICSTUFF {
ch_reads,
index.collect()
)
ch_versions = ch_versions.mix(BOWTIE2_ALIGNMENT.out.versions)
FRAGMENT_ENZYME(
digestion,
fasta
)
ch_versions = ch_versions.mix(FRAGMENT_ENZYME.out.versions)
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"
......@@ -68,6 +71,7 @@ workflow HICSTUFF {
index
)
FILTER_PCR_DUP.out.bam.set{ new_ch_bam }
ch_versions = ch_versions.mix(FILTER_PCR_DUP.out.versions)
}
else {
......@@ -130,4 +134,5 @@ workflow HICSTUFF {
emit:
cool = BUILD_MATRIX_COOL_ALT.out.matrix
versions = ch_versions
}
......@@ -230,6 +230,7 @@ workflow HIC {
)
ch_cool = HICSTUFF.out.cool
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