-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcontig_coverage.nf
More file actions
60 lines (49 loc) · 1.82 KB
/
contig_coverage.nf
File metadata and controls
60 lines (49 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
params.fwd_reads = null
params.rev_reads = null
params.se_reads = null
params.align_reads_options = [:]
params.samtools_viewsort_options = [:]
params.bedtools_genomecov_options = [:]
include { ALIGN_READS } from '../../modules/local/align_reads' addParams( options: params.align_reads_options )
include { SAMTOOLS_VIEW_AND_SORT } from '../../modules/local/samtools_view_sort' addParams( samtools_viewsort_options: params.samtools_viewsort_options )
include { BEDTOOLS_GENOMECOV } from '../../modules/local/bedtools_genomecov' addParams( options: params.bedtools_genomecov_options )
include { PARSE_BED } from '../../modules/local/parse_bed' addParams( )
workflow CONTIG_COVERAGE {
take:
metagenome_reads_ch
main:
ALIGN_READS(
metagenome_reads_ch
)
SAMTOOLS_VIEW_AND_SORT(
ALIGN_READS.out.sam
)
BEDTOOLS_GENOMECOV(
SAMTOOLS_VIEW_AND_SORT.out.bam
)
PARSE_BED(BEDTOOLS_GENOMECOV.out.bed)
emit:
sam = ALIGN_READS.out.sam
bam = SAMTOOLS_VIEW_AND_SORT.out.bam
bed = BEDTOOLS_GENOMECOV.out.bed
coverage = PARSE_BED.out.coverage
}
/*
---------------: Test Command :-----------------
nextflow run -resume $HOME/Autometa/subworkflows/local/contig_coverage.nf \\
--publish_dir_mode copy \\
--fwd_reads '/path/to/fwd_reads.fastq.gz' \\
--rev_reads '/path/to/rev_reads.fastq.gz'
*/
workflow {
coverage_inputs_ch = Channel
.fromPath(params.input)
.map { row ->
def meta = [:]
meta.id = row.simpleName
return [ meta, row ]
}
CONTIG_COVERAGE(
coverage_inputs_ch
)
}