Skip to content
Snippets Groups Projects
Commit 5402ab5f authored by nservant's avatar nservant
Browse files

update lint

parent 133e26c3
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## v1.3.0dev ## v1.3.0dev
* Add `--hicpro_maps` options to generate the raw and normalized HiC-Pro maps. The default is now to use cooler
* Add HiCExplorer distance decay quality control * Add HiCExplorer distance decay quality control
* Add HiCExplorer TADs calling * Add HiCExplorer TADs calling
* Add insulation score TADs calling * Add insulation score TADs calling
......
...@@ -730,7 +730,7 @@ process merge_stats { ...@@ -730,7 +730,7 @@ process merge_stats {
set val(prefix), file(fstat) from all_mapstat.groupTuple().concat(all_pairstat.groupTuple(), all_rsstat.groupTuple()) set val(prefix), file(fstat) from all_mapstat.groupTuple().concat(all_pairstat.groupTuple(), all_rsstat.groupTuple())
output: output:
file("mstats/") into all_mstats file("mstats/${sample}/*") into all_mstats
script: script:
sample = prefix.toString() - ~/(_R1|_R2|_val_1|_val_2|_1|_2)/ sample = prefix.toString() - ~/(_R1|_R2|_val_1|_val_2|_1|_2)/
...@@ -745,7 +745,7 @@ process merge_stats { ...@@ -745,7 +745,7 @@ process merge_stats {
/* /*
* HiC-Pro build matrix processes * HiC-Pro build matrix processes
* ONGOING VALIDATION - TO REPLACED BY COOLER ? * kept for backward compatibility
*/ */
...@@ -755,7 +755,7 @@ process build_contact_maps{ ...@@ -755,7 +755,7 @@ process build_contact_maps{
publishDir "${params.outdir}/hicpro/matrix/raw", mode: params.publish_dir_mode publishDir "${params.outdir}/hicpro/matrix/raw", mode: params.publish_dir_mode
when: when:
!params.skip_maps !params.skip_maps && params.hicpro_maps
input: input:
set val(sample), file(vpairs), val(mres) from ch_vpairs.combine(map_res) set val(sample), file(vpairs), val(mres) from ch_vpairs.combine(map_res)
...@@ -776,14 +776,14 @@ process run_ice{ ...@@ -776,14 +776,14 @@ process run_ice{
publishDir "${params.outdir}/hicpro/matrix/iced", mode: params.publish_dir_mode publishDir "${params.outdir}/hicpro/matrix/iced", mode: params.publish_dir_mode
when: when:
!params.skip_maps && !params.skip_ice !params.skip_maps && !params.skip_balancing && params.hicpro_maps
input: input:
set val(sample), val(res), file(rmaps), file(bed) from raw_maps set val(sample), val(res), file(rmaps), file(bed) from raw_maps
output: output:
set val(sample), val(res), file("*iced.matrix"), file(bed) into iced_maps_4h5, iced_maps_4cool set val(sample), val(res), file("*iced.matrix"), file(bed) into hicpro_iced_maps
file ("*.biases") into iced_bias file ("*.biases") into hicpro_iced_bias
script: script:
prefix = rmaps.toString() - ~/(\.matrix)?$/ prefix = rmaps.toString() - ~/(\.matrix)?$/
...@@ -896,31 +896,6 @@ process cooler_zoomify { ...@@ -896,31 +896,6 @@ process cooler_zoomify {
} }
/*
* Create h5 file
process convert_to_h5 {
tag "$sample"
label 'process_medium'
publishDir "${params.outdir}/contact_maps/norm/h5", mode: 'copy'
input:
set val(sample), val(res), file(maps) from norm_cool_maps_h5
output:
set val(sample), val(res), file("*.h5") into h5maps_ddecay, h5maps_ccomp, h5maps_tads
script:
"""
hicConvertFormat --matrices ${maps} \
--outFileName ${maps.baseName}.h5 \
--resolution ${res} \
--inputFormat cool \
--outputFormat h5 \
"""
}
*/
/**************************************************** /****************************************************
* DOWNSTREAM ANALYSIS * DOWNSTREAM ANALYSIS
*/ */
...@@ -946,7 +921,7 @@ process dist_decay { ...@@ -946,7 +921,7 @@ process dist_decay {
!params.skip_dist_decay !params.skip_dist_decay
input: input:
set val(sample), val(res), file(h5mat), val(r) from chddecay set val(sample), val(res), file(maps), val(r) from chddecay
output: output:
file("*_distcount.txt") file("*_distcount.txt")
...@@ -955,9 +930,9 @@ process dist_decay { ...@@ -955,9 +930,9 @@ process dist_decay {
script: script:
""" """
hicPlotDistVsCounts --matrices ${h5mat} \ hicPlotDistVsCounts --matrices ${maps} \
--plotFile ${h5mat.baseName}_distcount.png \ --plotFile ${maps.baseName}_distcount.png \
--outFileData ${h5mat.baseName}_distcount.txt --outFileData ${maps.baseName}_distcount.txt
""" """
} }
......
...@@ -62,6 +62,7 @@ params { ...@@ -62,6 +62,7 @@ params {
// Contact maps // Contact maps
bin_size = '1000000' bin_size = '1000000'
res_zoomify = '5000' res_zoomify = '5000'
hicpro_maps = false
ice_max_iter = 100 ice_max_iter = 100
ice_filter_low_count_perc = 0.02 ice_filter_low_count_perc = 0.02
ice_filter_high_count_perc = 0 ice_filter_high_count_perc = 0
...@@ -75,7 +76,6 @@ params { ...@@ -75,7 +76,6 @@ params {
// Workflow // Workflow
skip_maps = false skip_maps = false
skip_ice = false
skip_balancing = false skip_balancing = false
skip_mcool = false skip_mcool = false
skip_dist_decay = false skip_dist_decay = false
......
...@@ -162,12 +162,12 @@ ...@@ -162,12 +162,12 @@
"bwt2_opts_end2end": { "bwt2_opts_end2end": {
"type": "string", "type": "string",
"default": "'--very-sensitive -L 30 --score-min L,-0.6,-0.2 --end-to-end --reorder'", "default": "'--very-sensitive -L 30 --score-min L,-0.6,-0.2 --end-to-end --reorder'",
"description": "Option for end-to-end bowtie mapping" "description": "Option for HiC-Pro end-to-end bowtie mapping"
}, },
"bwt2_opts_trimmed": { "bwt2_opts_trimmed": {
"type": "string", "type": "string",
"default": "'--very-sensitive -L 20 --score-min L,-0.6,-0.2 --end-to-end --reorder'", "default": "'--very-sensitive -L 20 --score-min L,-0.6,-0.2 --end-to-end --reorder'",
"description": "Option for trimmed reads mapping" "description": "Option for HiC-Pro trimmed reads mapping"
}, },
"save_aligned_intermediates": { "save_aligned_intermediates": {
"type": "boolean", "type": "boolean",
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
} }
} }
}, },
"contact_maps_options": { "contact_maps": {
"title": "Contact maps", "title": "Contact maps",
"type": "object", "type": "object",
"description": "Options to build Hi-C contact maps", "description": "Options to build Hi-C contact maps",
...@@ -224,24 +224,28 @@ ...@@ -224,24 +224,28 @@
"default": "'1000000,500000'", "default": "'1000000,500000'",
"description": "Resolution to build the maps (comma separated)" "description": "Resolution to build the maps (comma separated)"
}, },
"hicpro_maps": {
"type": "string",
"description": "Generate raw and normalized contact maps with HiC-Pro"
},
"ice_filter_low_count_perc": { "ice_filter_low_count_perc": {
"type": "number", "type": "number",
"default": 0.02, "default": 0.02,
"description": "Filter low counts rows before normalization" "description": "Filter low counts rows before HiC-Pro normalization"
}, },
"ice_filter_high_count_perc": { "ice_filter_high_count_perc": {
"type": "integer", "type": "integer",
"description": "Filter high counts rows before normalization" "description": "Filter high counts rows before HiC-Pro normalization"
}, },
"ice_eps": { "ice_eps": {
"type": "number", "type": "number",
"default": 0.1, "default": 0.1,
"description": "Threshold for ICE convergence" "description": "Threshold for HiC-Pro ICE convergence"
}, },
"ice_max_iter": { "ice_max_iter": {
"type": "integer", "type": "integer",
"default": 100, "default": 100,
"description": "Maximum number of iteraction for ICE normalization" "description": "Maximum number of iteraction for HiC-Pro ICE normalization"
}, },
"res_zoomify": { "res_zoomify": {
"type": "string", "type": "string",
...@@ -289,10 +293,6 @@ ...@@ -289,10 +293,6 @@
"type": "boolean", "type": "boolean",
"description": "Do not build contact maps" "description": "Do not build contact maps"
}, },
"skip_ice": {
"type": "boolean",
"description": "Do not run ICE normalization"
},
"skip_dist_decay": { "skip_dist_decay": {
"type": "boolean", "type": "boolean",
"description": "Do not run distance/decay plot" "description": "Do not run distance/decay plot"
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
"$ref": "#/definitions/valid_pairs_detection" "$ref": "#/definitions/valid_pairs_detection"
}, },
{ {
"$ref": "#/definitions/contact_maps_options" "$ref": "#/definitions/contact_maps"
}, },
{ {
"$ref": "#/definitions/downstream_analysis" "$ref": "#/definitions/downstream_analysis"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment