diff --git a/modules/local/hicexplorer/hicFindTADs.nf b/modules/local/hicexplorer/hicFindTADs.nf new file mode 100644 index 0000000000000000000000000000000000000000..676e8e75bd63624a8cc88f5427900984a444a4e3 --- /dev/null +++ b/modules/local/hicexplorer/hicFindTADs.nf @@ -0,0 +1,29 @@ +/* + * hicexplorer - hicFindTADs + */ + +process HIC_FIND_TADS { + label 'process_medium' + + input: + tuple val(meta), path(cool) + + output: + path("*hicfindtads*"), emit:results + path("versions.yml"), emit:versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + hicFindTADs --matrix ${cool} \ + --outPrefix ${prefix}_hicfindtads \ + ${args} \ + --numberOfProcessors ${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hicexplorer: \$(hicFindTADs --version 2>&1 | sed 's/hicFindTADs //') + END_VERSIONS + """ +} diff --git a/modules/local/hicexplorer/hicPlotDistVsCounts.nf b/modules/local/hicexplorer/hicPlotDistVsCounts.nf new file mode 100644 index 0000000000000000000000000000000000000000..41041eb8d9debba80096164db9a0f938dd5086c1 --- /dev/null +++ b/modules/local/hicexplorer/hicPlotDistVsCounts.nf @@ -0,0 +1,28 @@ +/* + * hicexplorer - hicPlotDistVsCounts + */ + +process HIC_PLOT_DIST_VS_COUNTS { + label 'process_medium' + + input: + tuple val(meta), path(cool) + + output: + path("*distcount*"), emit:results + path("versions.yml"), emit:versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + hicPlotDistVsCounts --matrices ${cool} \ + --plotFile ${prefix}_distcount.png \ + --outFileData ${prefix}_distcount.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hicexplorer: \$(hicPlotDistVsCounts --version 2>&1 | sed 's/hicPlotDistVsCounts //') + END_VERSIONS + """ +}