mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
luslab-umitools | Initialized test.nf
This commit is contained in:
parent
ab2d819df3
commit
bfdccfe1b9
1 changed files with 59 additions and 0 deletions
|
@ -0,0 +1,59 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
// Define DSL2
|
||||||
|
nextflow.preview.dsl=2
|
||||||
|
|
||||||
|
// Log
|
||||||
|
log.info ("Starting test pipeline for BAM deduplication")
|
||||||
|
|
||||||
|
/* Module inclusions
|
||||||
|
--------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
include umi_tools from './umi-tools.nf'
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------------*/
|
||||||
|
/* Define input channels
|
||||||
|
--------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
testMetaDataBam = [
|
||||||
|
['Sample1', "$baseDir/input/prpf8_ctrl_rep1.Aligned.sortedByCoord.out.bam"],
|
||||||
|
['Sample2', "$baseDir/input/prpf8_ctrl_rep2.Aligned.sortedByCoord.out.bam"],
|
||||||
|
['Sample3', "$baseDir/input/prpf8_ctrl_rep4.Aligned.sortedByCoord.out.bam"],
|
||||||
|
['Sample4', "$baseDir/input/prpf8_eif4a3_rep1.Aligned.sortedByCoord.out.bam"],
|
||||||
|
['Sample5', "$baseDir/input/prpf8_eif4a3_rep2.Aligned.sortedByCoord.out.bam"],
|
||||||
|
['Sample6', "$baseDir/input/prpf8_eif4a3_rep4.Aligned.sortedByCoord.out.bam"]
|
||||||
|
]
|
||||||
|
|
||||||
|
testMetaDataBai = [
|
||||||
|
['Sample1', "$baseDir/input/prpf8_ctrl_rep1.Aligned.sortedByCoord.out.bai"],
|
||||||
|
['Sample2', "$baseDir/input/prpf8_ctrl_rep2.Aligned.sortedByCoord.out.bai"],
|
||||||
|
['Sample3', "$baseDir/input/prpf8_ctrl_rep4.Aligned.sortedByCoord.out.bai"],
|
||||||
|
['Sample4', "$baseDir/input/prpf8_eif4a3_rep1.Aligned.sortedByCoord.out.bai"],
|
||||||
|
['Sample5', "$baseDir/input/prpf8_eif4a3_rep2.Aligned.sortedByCoord.out.bai"],
|
||||||
|
['Sample6', "$baseDir/input/prpf8_eif4a3_rep4.Aligned.sortedByCoord.out.bai"]
|
||||||
|
]
|
||||||
|
|
||||||
|
// Create channels of test data
|
||||||
|
|
||||||
|
//Bam input channel
|
||||||
|
Channel
|
||||||
|
.from(testMetaDataBam)
|
||||||
|
.map { row -> [ row[0], file(row[1], checkIfExists: true) ]}
|
||||||
|
.set {ch_test_meta_bam}
|
||||||
|
|
||||||
|
//BamBai input channel
|
||||||
|
Channel
|
||||||
|
.from(testMetaDataBai)
|
||||||
|
.map { row -> [ row[0], file(row[1], checkIfExists: true) ] }
|
||||||
|
.join(ch_test_meta_bam)
|
||||||
|
.set {ch_test_meta_bambai}
|
||||||
|
|
||||||
|
// Run workflow
|
||||||
|
workflow {
|
||||||
|
|
||||||
|
// Run dedup
|
||||||
|
umi_tools( ch_test_meta_bambai )
|
||||||
|
|
||||||
|
// Collect file names and view output
|
||||||
|
umi_tools.out.dedupBam | view
|
||||||
|
}
|
Loading…
Reference in a new issue