| 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 |
} |