Skip to content
Snippets Groups Projects
Verified Commit c85adfeb authored by Mia Croiset's avatar Mia Croiset
Browse files

connect hicstuff sub to cooler subworkflow

parent adeec642
No related branches found
No related tags found
No related merge requests found
...@@ -118,6 +118,7 @@ workflow HICSTUFF { ...@@ -118,6 +118,7 @@ workflow HICSTUFF {
fasta.collect() fasta.collect()
) )
BAM2PAIRS.out.idx_pairs.set{ ch_idx_pairs } BAM2PAIRS.out.idx_pairs.set{ ch_idx_pairs }
BAM2PAIRS.out.valid_pairs.set{ ch_valid_pairs }
if( params.filter_event ){ if( params.filter_event ){
FILTER_EVENT( FILTER_EVENT(
...@@ -143,6 +144,12 @@ workflow HICSTUFF { ...@@ -143,6 +144,12 @@ workflow HICSTUFF {
FILTER_PCR.out.idx_pairs_pcrfree.set{ ch_idx_pairs } FILTER_PCR.out.idx_pairs_pcrfree.set{ ch_idx_pairs }
} }
ch_idx_pairs.combine(ch_valid_pairs)
.map {
meta1, idx, meta2, pairs ->
meta1 == meta2 ? [ meta1, idx, pairs ] : null
}.set{ ch_pairs }
BUILD_MATRIX( BUILD_MATRIX(
ch_idx_pairs, ch_idx_pairs,
FRAGMENT_ENZYME.out.fragments_list.collect() FRAGMENT_ENZYME.out.fragments_list.collect()
...@@ -153,12 +160,13 @@ workflow HICSTUFF { ...@@ -153,12 +160,13 @@ workflow HICSTUFF {
FRAGMENT_ENZYME.out.fragments_list.collect() FRAGMENT_ENZYME.out.fragments_list.collect()
) )
BUILD_MATRIX_COOL_ALT( /* BUILD_MATRIX_COOL_ALT(
chromosome_size.collect(), chromosome_size.collect(),
ch_idx_pairs ch_idx_pairs
) ) */
emit: emit:
cool = BUILD_MATRIX_COOL_ALT.out.matrix //cool = BUILD_MATRIX_COOL_ALT.out.matrix
pairs = ch_pairs
versions = ch_versions versions = ch_versions
} }
...@@ -222,14 +222,30 @@ workflow HIC { ...@@ -222,14 +222,30 @@ workflow HIC {
ch_map_res, ch_map_res,
ch_fasta ch_fasta
) )
ch_pairs = HICPRO.out.pairs
ch_mqc = HICPRO.out.mqc ch_mqc = HICPRO.out.mqc
ch_versions = ch_versions.mix(HICPRO.out.versions) ch_versions = ch_versions.mix(HICPRO.out.versions)
}
else {
HICSTUFF(
ch_reads,
PREPARE_GENOME.out.index,
ch_ligation_site,
params.digestion, //str enzyme
ch_fasta,
PREPARE_GENOME.out.chromosome_size
)
//ch_cool = HICSTUFF.out.cool
ch_pairs = HICSTUFF.out.pairs
ch_mqc = Channel.empty()
ch_versions = ch_versions.mix(HICSTUFF.out.versions)
}
// //
// SUB-WORKFLOW: COOLER // SUB-WORKFLOW: COOLER
// //
COOLER ( COOLER (
HICPRO.out.pairs, ch_pairs,
PREPARE_GENOME.out.chromosome_size, PREPARE_GENOME.out.chromosome_size,
ch_map_res ch_map_res
) )
...@@ -251,21 +267,7 @@ workflow HIC { ...@@ -251,21 +267,7 @@ workflow HIC {
ch_versions = ch_versions.mix(HIC_PLOT_DIST_VS_COUNTS.out.versions) ch_versions = ch_versions.mix(HIC_PLOT_DIST_VS_COUNTS.out.versions)
} }
ch_cool = COOLER.out.cool ch_cool = COOLER.out.cool
}
else {
HICSTUFF(
ch_reads,
PREPARE_GENOME.out.index,
ch_ligation_site,
params.digestion, //str enzyme
ch_fasta,
PREPARE_GENOME.out.chromosome_size
)
ch_cool = HICSTUFF.out.cool
ch_mqc = Channel.empty()
ch_versions = ch_versions.mix(HICSTUFF.out.versions)
}
// //
// MODULE: HICEXPLORER/HIC_PLOT_MATRIX // MODULE: HICEXPLORER/HIC_PLOT_MATRIX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment