Skip to content
Snippets Groups Projects
Commit 4b0a2fe3 authored by nservant's avatar nservant
Browse files

[MODIF] update local modules

parent 37ed36d0
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ class RowChecker: ...@@ -126,7 +126,7 @@ class RowChecker:
for row in self.modified: for row in self.modified:
sample = row[self._sample_col] sample = row[self._sample_col]
seen[sample] += 1 seen[sample] += 1
row[self._sample_col] = f"{sample}_T{seen[sample]}" ##row[self._sample_col] = f"{sample}_T{seen[sample]}"
def read_head(handle, num_lines=10): def read_head(handle, num_lines=10):
......
...@@ -163,6 +163,7 @@ process { ...@@ -163,6 +163,7 @@ process {
mode: 'copy', mode: 'copy',
enabled: params.hicpro_maps enabled: params.hicpro_maps
] ]
ext.prefix = { "${meta.id}.${resolution}" }
} }
withName: 'ICE_NORMALIZATION' { withName: 'ICE_NORMALIZATION' {
...@@ -193,6 +194,7 @@ process { ...@@ -193,6 +194,7 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
mode: 'copy' mode: 'copy'
] ]
ext.prefix={ "cooler_bins_${cool_bin}" }
} }
withName: 'COOLER_CLOAD' { withName: 'COOLER_CLOAD' {
...@@ -202,6 +204,7 @@ process { ...@@ -202,6 +204,7 @@ process {
mode: 'copy', mode: 'copy',
enabled : params.save_raw_maps enabled : params.save_raw_maps
] ]
ext.prefix = { "${meta.id}.${cool_bin}" }
ext.args = "pairs -c1 2 -p1 3 -c2 4 -p2 5" ext.args = "pairs -c1 2 -p1 3 -c2 4 -p2 5"
} }
...@@ -212,7 +215,7 @@ process { ...@@ -212,7 +215,7 @@ process {
mode: 'copy' mode: 'copy'
] ]
ext.args = '--force' ext.args = '--force'
ext.prefix = { "${meta.id}_balanced" } ext.prefix = { "${cool.baseName}_balanced" }
} }
withName: 'COOLER_DUMP' { withName: 'COOLER_DUMP' {
...@@ -258,6 +261,7 @@ process { ...@@ -258,6 +261,7 @@ process {
mode: 'copy' mode: 'copy'
] ]
ext.args = '--bigwig' ext.args = '--bigwig'
ext.prefix = { "${meta.id}.${resolution}" }
} }
//******************************** //********************************
...@@ -270,6 +274,7 @@ process { ...@@ -270,6 +274,7 @@ process {
mode: 'copy' mode: 'copy'
] ]
ext.args = '15 25 50 --window-pixels' ext.args = '15 25 50 --window-pixels'
ext.prefix = { "${meta.id}.${resolution}" }
} }
withName: 'HIC_FIND_TADS' { withName: 'HIC_FIND_TADS' {
...@@ -279,5 +284,6 @@ process { ...@@ -279,5 +284,6 @@ process {
mode: 'copy' mode: 'copy'
] ]
ext.args = '--correctForMultipleTesting fdr' ext.args = '--correctForMultipleTesting fdr'
ext.prefix = { "${meta.id}.${resolution}" }
} }
} }
process MERGE_BOWTIE2{ process MERGE_BOWTIE2{
tag "$prefix" tag "${meta.id}"
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null)
......
process BUILD_CONTACT_MAPS{ process BUILD_CONTACT_MAPS{
tag "$meta.id - $res" tag "${meta.id}"
label 'process_high_memory' label 'process_high_memory'
conda (params.enable_conda ? "conda-forge::sed=4.7" : null) conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
...@@ -8,19 +8,20 @@ process BUILD_CONTACT_MAPS{ ...@@ -8,19 +8,20 @@ process BUILD_CONTACT_MAPS{
'ubuntu:20.04' }" 'ubuntu:20.04' }"
input: input:
tuple val(meta), path(vpairs), val(res) tuple val(meta), path(vpairs), val(resolution)
path chrsize tuple val(meta2), path(chrsize)
output: output:
tuple val(meta), val(res), path("*.matrix"), path("*.bed"), emit: maps tuple val(meta), val(resolution), path("*.matrix"), path("*.bed"), emit: maps
script: script:
def prefix = task.ext.prefix ?: "${meta.id}"
""" """
build_matrix \\ build_matrix \\
--matrix-format upper \\ --matrix-format upper \\
--binsize ${res} \\ --binsize ${resolution} \\
--chrsizes ${chrsize} \\ --chrsizes ${chrsize} \\
--ifile ${vpairs} \\ --ifile ${vpairs} \\
--oprefix ${meta.id}_${res} --oprefix ${prefix}
""" """
} }
process COMBINE_MATES { process COMBINE_MATES {
tag "$prefix" tag "${meta.id}"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "conda-forge::python=3.9 bioconda::pysam=0.19.0" : null) conda (params.enable_conda ? "conda-forge::python=3.9 bioconda::pysam=0.19.0" : null)
......
process MERGE_STATS { process MERGE_STATS {
tag "${meta.id}"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "conda-forge::python=3.9" : null) conda (params.enable_conda ? "conda-forge::python=3.9" : null)
......
process ICE_NORMALIZATION{ process ICE_NORMALIZATION{
tag "$rmaps" tag "${meta.id}"
label 'process_high_memory' label 'process_high_memory'
conda (params.enable_conda ? "conda-forge::python=3.9 bioconda::iced=0.5.10 conda-forge::numpy=1.22.3" : null) conda (params.enable_conda ? "conda-forge::python=3.9 bioconda::iced=0.5.10 conda-forge::numpy=1.22.3" : null)
......
process MULTIQC { process MULTIQC {
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? 'bioconda::multiqc=1.12' : null) conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' : 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.12--pyhdfd78af_0' }" 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
input: input:
path multiqc_config path multiqc_config
......
...@@ -2,12 +2,17 @@ process SPLIT_COOLER_DUMP { ...@@ -2,12 +2,17 @@ process SPLIT_COOLER_DUMP {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "conda-forge::gawk=5.1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
input: input:
tuple val(meta), path(bedpe) tuple val(meta), path(bedpe)
output: output:
path "*.txt", emit: matrix tuple val(meta), path("*.txt"), emit: matrix
path "versions.yml", emit: versions path ("versions.yml"), emit: versions
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
......
...@@ -72,6 +72,7 @@ workflow HICPRO { ...@@ -72,6 +72,7 @@ workflow HICPRO {
//if (params.split_fastq){ //if (params.split_fastq){
ch_valid_pairs = ch_valid_pairs.map{ it -> removeChunks(it)}.groupTuple() ch_valid_pairs = ch_valid_pairs.map{ it -> removeChunks(it)}.groupTuple()
ch_valid_pairs.view()
ch_hicpro_stats = HICPRO_MAPPING.out.mapstats.map{it->removeChunks(it)}.groupTuple() ch_hicpro_stats = HICPRO_MAPPING.out.mapstats.map{it->removeChunks(it)}.groupTuple()
.concat(HICPRO_MAPPING.out.pairstats.map{it->removeChunks(it)}.groupTuple(), .concat(HICPRO_MAPPING.out.pairstats.map{it->removeChunks(it)}.groupTuple(),
ch_valid_stats.map{it->removeChunks(it)}.groupTuple()) ch_valid_stats.map{it->removeChunks(it)}.groupTuple())
......
...@@ -9,7 +9,6 @@ workflow INPUT_CHECK { ...@@ -9,7 +9,6 @@ workflow INPUT_CHECK {
samplesheet // file: /path/to/samplesheet.csv samplesheet // file: /path/to/samplesheet.csv
main: main:
if (params.split_fastq){ if (params.split_fastq){
SAMPLESHEET_CHECK ( samplesheet ) SAMPLESHEET_CHECK ( samplesheet )
......
...@@ -184,6 +184,7 @@ workflow HIC { ...@@ -184,6 +184,7 @@ workflow HIC {
// //
// SUB-WORFLOW: HiC-Pro // SUB-WORFLOW: HiC-Pro
// //
INPUT_CHECK.out.reads.view()
HICPRO ( HICPRO (
INPUT_CHECK.out.reads, INPUT_CHECK.out.reads,
PREPARE_GENOME.out.index, PREPARE_GENOME.out.index,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment