Skip to content
Snippets Groups Projects
Commit 863e95be authored by nservant's avatar nservant
Browse files

[MODIF] deal with technical replicates

parent d8ea2398
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,16 @@ Channel.fromPath( params.fasta ) ...@@ -143,6 +143,16 @@ Channel.fromPath( params.fasta )
// Info required for completion email and summary // Info required for completion email and summary
def multiqc_report = [] def multiqc_report = []
def setMetaChunk(row){
def map = []
row[1].eachWithIndex() { file,i ->
meta = row[0].clone()
meta.chunks = i
map += [meta, file]
}
return map
}
workflow HIC { workflow HIC {
ch_versions = Channel.empty() ch_versions = Channel.empty()
...@@ -153,8 +163,19 @@ workflow HIC { ...@@ -153,8 +163,19 @@ workflow HIC {
INPUT_CHECK ( INPUT_CHECK (
ch_input ch_input
) )
.reads
.map {
meta, fastq ->
meta.id = meta.id.split('_')[0..-2].join('_')
[ meta, fastq ] }
.groupTuple(by: [0])
.flatMap { it -> setMetaChunk(it) }
.collate(2)
.set { ch_fastq }
ch_fastq.view()
INPUT_CHECK.out.reads.view() //INPUT_CHECK.out.reads.view()
// //
// SUBWORKFLOW: Prepare genome annotation // SUBWORKFLOW: Prepare genome annotation
...@@ -169,7 +190,7 @@ workflow HIC { ...@@ -169,7 +190,7 @@ workflow HIC {
// MODULE: Run FastQC // MODULE: Run FastQC
// //
FASTQC ( FASTQC (
INPUT_CHECK.out.reads ch_fastq
) )
ch_versions = ch_versions.mix(FASTQC.out.versions) ch_versions = ch_versions.mix(FASTQC.out.versions)
...@@ -177,7 +198,7 @@ workflow HIC { ...@@ -177,7 +198,7 @@ workflow HIC {
// SUB-WORFLOW: HiC-Pro // SUB-WORFLOW: HiC-Pro
// //
HICPRO ( HICPRO (
INPUT_CHECK.out.reads, ch_fastq,
PREPARE_GENOME.out.index, PREPARE_GENOME.out.index,
PREPARE_GENOME.out.res_frag, PREPARE_GENOME.out.res_frag,
PREPARE_GENOME.out.chromosome_size, PREPARE_GENOME.out.chromosome_size,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment