-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtrimming_aligning5.nf
65 lines (54 loc) · 1.21 KB
/
trimming_aligning5.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
62
63
64
65
#!/usr/bin/env nextflow
/* Testing for NCBI SpEW project, trimming module
* Zhou (Ark) Fang zhf9@pitt.edu
*/
inPath = "/zfs1/ncbi-workshop/AP/nextflow/"
inFiles = "$inPath/*.fastq.gz"
singleEnd = true
adapter1 = "ADATPER_FWD"
adapter2 = "ADATPER_REV"
params.in = "/zfs1/ncbi-workshop/AP/nextflow/*.fastq"
sequences = file(params.in)
/* records = "/zfs1/ncbi-workshop/AP/RNAseq/AlignedReads/" */
process modules{
script:
"""
module load FastQC
module load bowtie2
module load tophat
module load cutadapt
"""
}
process fastqc{
input:
file reads from sequences
script:
"""
mkdir fastqc_logs
fastqc -o fastqc_logs -f fastq -q ${reads}
"""
}
process trimming{
input:
file inFiles
output:
file 'trimmed_*' /* into records */
script:
if (singleEnd==true)
"""
bash trimming.sh -i inPath -s -a1 adapter1 -a2 adapter2
"""
else
"""
bash /zfs1/nci-workshop/AP/nextflow/trimming.sh -i inPath -a1 adapter1 -a2 adapter2
"""
}
process alignment {
input:
file '*.fastq.gz'
output:
file 'aligned_*' into /* records */
"""
bash /zfs1/ncbi-workshop/AP/nextflow/align2.sh
"""
}