-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathexample.nf
61 lines (49 loc) · 1.12 KB
/
example.nf
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
61
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
// Define pipeline input parameters
// note: input files require the use of absolute paths
params.ref = '/path/to/ref.fasta'
params.left = '/path/to/reads_1.fastq'
params.right = '/path/to/reads_2.fastq'
params.outdir = 'results'
// Create reference transcriptome index using Salmom
process SALMON_INDEX {
input:
path ref
output:
path index
"""
salmon index -t '${ref}' -i index
"""
}
// Transcriptome alignment and quantification using Salmon
process SALMON_ALIGN_QUANT {
publishDir params.outdir
input:
path index
path left
path right
output:
path 'quant'
"""
salmon quant -i $index -l A -1 '${left}' -2 '${right}' --validateMappings -o quant
"""
}
// FastQC
process FASTQC {
publishDir params.outdir
input:
path index
path left
path right
output:
path 'qc'
"""
mkdir qc && fastqc --quiet '${params.left}' '${params.right}' --outdir qc
"""
}
workflow {
SALMON_INDEX(params.ref)
SALMON_ALIGN_QUANT( SALMON_INDEX.out, params.left, params.right )
FASTQC( SALMON_INDEX.out, params.left, params.right )
}