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:
for row in self.modified:
sample = row[self._sample_col]
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):
......
......@@ -163,6 +163,7 @@ process {
mode: 'copy',
enabled: params.hicpro_maps
]
ext.prefix = { "${meta.id}.${resolution}" }
}
withName: 'ICE_NORMALIZATION' {
......@@ -193,6 +194,7 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
mode: 'copy'
]
ext.prefix={ "cooler_bins_${cool_bin}" }
}
withName: 'COOLER_CLOAD' {
......@@ -202,6 +204,7 @@ process {
mode: 'copy',
enabled : params.save_raw_maps
]
ext.prefix = { "${meta.id}.${cool_bin}" }
ext.args = "pairs -c1 2 -p1 3 -c2 4 -p2 5"
}
......@@ -212,7 +215,7 @@ process {
mode: 'copy'
]
ext.args = '--force'
ext.prefix = { "${meta.id}_balanced" }
ext.prefix = { "${cool.baseName}_balanced" }
}
withName: 'COOLER_DUMP' {
......@@ -258,6 +261,7 @@ process {
mode: 'copy'
]
ext.args = '--bigwig'
ext.prefix = { "${meta.id}.${resolution}" }
}
//********************************
......@@ -270,6 +274,7 @@ process {
mode: 'copy'
]
ext.args = '15 25 50 --window-pixels'
ext.prefix = { "${meta.id}.${resolution}" }
}
withName: 'HIC_FIND_TADS' {
......@@ -279,5 +284,6 @@ process {
mode: 'copy'
]
ext.args = '--correctForMultipleTesting fdr'
ext.prefix = { "${meta.id}.${resolution}" }
}
}
process MERGE_BOWTIE2{
tag "$prefix"
tag "${meta.id}"
label 'process_medium'
conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null)
......
process BUILD_CONTACT_MAPS{
tag "$meta.id - $res"
tag "${meta.id}"
label 'process_high_memory'
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
......@@ -8,19 +8,20 @@ process BUILD_CONTACT_MAPS{
'ubuntu:20.04' }"
input:
tuple val(meta), path(vpairs), val(res)
path chrsize
tuple val(meta), path(vpairs), val(resolution)
tuple val(meta2), path(chrsize)
output:
tuple val(meta), val(res), path("*.matrix"), path("*.bed"), emit: maps
tuple val(meta), val(resolution), path("*.matrix"), path("*.bed"), emit: maps
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
build_matrix \\
--matrix-format upper \\
--binsize ${res} \\
--binsize ${resolution} \\
--chrsizes ${chrsize} \\
--ifile ${vpairs} \\
--oprefix ${meta.id}_${res}
--oprefix ${prefix}
"""
}
process COMBINE_MATES {
tag "$prefix"
tag "${meta.id}"
label 'process_low'
conda (params.enable_conda ? "conda-forge::python=3.9 bioconda::pysam=0.19.0" : null)
......
process MERGE_STATS {
tag "${meta.id}"
label 'process_low'
conda (params.enable_conda ? "conda-forge::python=3.9" : null)
......
process ICE_NORMALIZATION{
tag "$rmaps"
tag "${meta.id}"
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)
......
process MULTIQC {
label 'process_medium'
conda (params.enable_conda ? 'bioconda::multiqc=1.12' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.12--pyhdfd78af_0' }"
conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
input:
path multiqc_config
......
......@@ -2,12 +2,17 @@ process SPLIT_COOLER_DUMP {
tag "$meta.id"
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:
tuple val(meta), path(bedpe)
output:
path "*.txt", emit: matrix
path "versions.yml", emit: versions
tuple val(meta), path("*.txt"), emit: matrix
path ("versions.yml"), emit: versions
script:
def args = task.ext.args ?: ''
......
......@@ -72,6 +72,7 @@ workflow HICPRO {
//if (params.split_fastq){
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()
.concat(HICPRO_MAPPING.out.pairstats.map{it->removeChunks(it)}.groupTuple(),
ch_valid_stats.map{it->removeChunks(it)}.groupTuple())
......
......@@ -9,7 +9,6 @@ workflow INPUT_CHECK {
samplesheet // file: /path/to/samplesheet.csv
main:
if (params.split_fastq){
SAMPLESHEET_CHECK ( samplesheet )
......
......@@ -184,6 +184,7 @@ workflow HIC {
//
// SUB-WORFLOW: HiC-Pro
//
INPUT_CHECK.out.reads.view()
HICPRO (
INPUT_CHECK.out.reads,
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