-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
55 lines (36 loc) · 883 Bytes
/
main.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
#!/usr/bin/env nextflow
nextflow.preview.dsl=2
params.reads = '/hpc/diaggen/users/Behzad/bam/PMABM000_fastq/*_r{1,2}.fastq'
params.transcripts = '/hpc/diaggen/users/Behzad/bam/STAR/hg38_genome/gencode.v39.transcripts.fa'
process INDEX {
input:
path fasta
output:
path 'index'
"""
salmon index \\
-t "${fasta}" \\
-i index \\
"""
}
transcriptome_ch = Channel.fromPath(params.transcripts)
process QUANT {
input:
path index
tuple val(pair_id), path(reads)
output:
path (pair_id)
"""
salmon quant \\
--index $index\\
--libType=U \\
-1 ${reads[0]} \\
-2 ${reads[1]} \\
-o $pair_id
"""
}
read_pairs_ch = Channel.fromFilePairs(params.reads, checkIfExists:true)
workflow {
index_ch=INDEX(transcriptome_ch)
quant_ch=QUANT(index_ch,read_pairs_ch)
}