PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.3
Code Block Pro – Beautiful Syntax Highlighting v1.27.3
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / nextflow.sample

nextflow.sample in Code Block Pro – Beautiful Syntax Highlighting 1.27.3, at build/shiki/samples/nextflow.sample

63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * The following pipeline parameters specify the reference genomes
3 * and read pairs and can be provided as command line options
4 */
5 params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq"
6 params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
7 params.outdir = "results"
8
9 workflow {
10 read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true )
11
12 INDEX(params.transcriptome)
13 FASTQC(read_pairs_ch)
14 QUANT(INDEX.out, read_pairs_ch)
15 }
16
17 process INDEX {
18 tag "$transcriptome.simpleName"
19
20 input:
21 path transcriptome
22
23 output:
24 path 'index'
25
26 script:
27 """
28 salmon index --threads $task.cpus -t $transcriptome -i index
29 """
30 }
31
32 process FASTQC {
33 tag "FASTQC on $sample_id"
34 publishDir params.outdir
35
36 input:
37 tuple val(sample_id), path(reads)
38
39 output:
40 path "fastqc_${sample_id}_logs"
41
42 script:
43 """
44 fastqc.sh "$sample_id" "$reads"
45 """
46 }
47
48 process QUANT {
49 tag "$pair_id"
50 publishDir params.outdir
51
52 input:
53 path index
54 tuple val(pair_id), path(reads)
55
56 output:
57 path pair_id
58
59 script:
60 """
61 salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id
62 """
63 }