diff --git a/conf/test.config b/conf/test.config
index a08cfe8c335f53c91f99039a2175f42965969cbc..d06ad508f9c3cd0db4b2173b5fe7a890216369c5 100644
--- a/conf/test.config
+++ b/conf/test.config
@@ -34,4 +34,5 @@ params {
   res_dist_decay = '1000'
   res_tads = '1000'
   tads_caller = 'insulation,hicexplorer'
+  res_compartments = '1000'
 }
diff --git a/main.nf b/main.nf
index f1c597a3c86cd507a3870b3bfb1c3f5484db153a..382432fd4435b7e9b3c9d1b2600aca8958f8581b 100644
--- a/main.nf
+++ b/main.nf
@@ -277,9 +277,23 @@ if (params.res_dist_decay && !params.skip_dist_decay){
   }
 }
 
+if (params.res_compartments && !params.skip_compartments){
+  Channel.from( "${params.res_compartments}" )
+    .splitCsv()
+    .flatten()
+    .into {comp_bin; comp_res}
+    map_res = map_res.concat(comp_bin)
+    all_res = all_res + ',' + params.res_compartments
+}else{
+  comp_res = Channel.create()
+  if (!params.skip_compartments){
+    log.warn "[nf-core/hic] Hi-C resolution for compartment calling not specified. See --res_compartments" 
+  }
+}
+
 map_res
   .unique()
-  .into { map_res_summary; map_res; map_res_cool }
+  .into { map_res_summary; map_res; map_res_cool; map_comp }
 
 /**********************************************************
  * SET UP LOGS
@@ -1020,9 +1034,8 @@ process dist_decay {
  * Compartment calling
  */
 
-/*
 if(!params.skip_compartments){
-  chcomp = maps_cool_comp.combine(comp_res).filter{ it[1] == it[4] }.dump(tag: "comp")
+  chcomp = maps_cool_comp.combine(comp_res).filter{ it[1] == it[3] }.dump(tag: "comp")
 }else{
   chcomp = Channel.empty()
 }
@@ -1036,17 +1049,16 @@ process compartment_calling {
   !params.skip_compartments
 
   input:
-  set val(sample), val(res), file(mat), file(bed), val(r) from chcomp
+  set val(sample), val(res), file(cool), val(r) from chcomp
 
   output:
-  file("*.bedgraph") optional true into out_compartments
+  file("*compartments*") optional true into out_compartments
 
   script:
   """
-  call_compartments.r --matrix ${mat} --bed ${bed}
+  cooltools call-compartments --contact-type cis -o ${sample}_compartments ${cool}
   """
 }
-*/
 
 
 /*
@@ -1068,14 +1080,14 @@ process tads_hicexplorer {
   !params.skip_tads && params.tads_caller =~ 'hicexplorer'
 
   input:
-  set val(sample), val(res), file(h5mat), val(r) from chtads
+  set val(sample), val(res), file(cool), val(r) from chtads
 
   output:
   file("*.{bed,bedgraph,gff}") into hicexplorer_tads
 
   script:
   """
-  hicFindTADs --matrix ${h5mat} \
+  hicFindTADs --matrix ${cool} \
   	      --outPrefix tad \
 	      --correctForMultipleTesting fdr \
 	      --numberOfProcessors ${task.cpus}
diff --git a/nextflow.config b/nextflow.config
index c3ddb3859d3957cab975eaa4f28fb1103e9fe06b..6e8eae6adffce6204bfa2353fcc5d27a8a52ae0c 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -60,6 +60,7 @@ params {
 
   // Contact maps
   bin_size = '1000000'
+  res_zoomify = '5000'
   ice_max_iter = 100
   ice_filer_low_count_perc = 0.02
   ice_filer_high_count_perc =  0
@@ -69,7 +70,7 @@ params {
   res_dist_decay = '250000'
   tads_caller = 'insulation'
   res_tads = '40000'
-  res_zoomify = '5000'
+  res_compartments = '250000'
 
   // Workflow
   skip_maps = false
@@ -77,6 +78,7 @@ params {
   skip_balancing = false
   skip_mcool = false
   skip_dist_decay = false
+  skip_compartments = false
   skip_tads = false
   skip_multiqc = false