-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.nf
executable file
·61 lines (53 loc) · 2.28 KB
/
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
56
57
58
59
60
61
nextflow.enable.dsl=2
include {salmon_map} from "./modules/salmon_map"
include {preprocess} from './modules/preprocess'
include {af} from './modules/af'
workflow {
data = Channel
.fromPath(params.input_sheets.sample)
.splitCsv(header:true, sep: "\t", strip: true)
.map{ row-> tuple(row.chemistry,
row.reference,
row.dataset_name,
row.dataset_url,
row.fastq_url,
row.fastq_MD5sum,
row.delete_fastq,
row.feature_barcode_csv_url,
row.multiplexing_library_csv_url)
}
// run alevin-fry on the dataset
// producing both the knee filtered and
// unfiltered output
preprocess()
// merge permit list
data = preprocess.out.chem_pl.cross(data)
.map(it -> tuple(it[1][1], // reference
it[1][0], // chemistry
it[0][1], // pl
it[1][2], // dataset_name
it[1][3], // dataset_url
it[1][4], // fastq_url
it[1][5], // fastq_MD5sum
it[1][6], // delete_fastq
it[1][7], // feature_barcode_csv_url
it[1][8] // multiplexing_library_csv_url
))
// merge t2g and salmon index
data = preprocess.out.ref_t2g_index.cross(data)
.map(it -> tuple( it[1][1], // chemistry
it[0][0], // reference
it[1][3], // dataset_name
it[1][4], // dataset_url
it[1][5], // fastq_url
it[1][6], // fastq_MD5sum
it[1][7], // delete_fastq
it[1][8], // feature_barcode_csv_url
it[1][9], // multiplexing_library_csv_url
it[0][2], // index_path
it[1][2], // pl_path
it[0][1] // t2g_path
))
salmon_map(data)
af(salmon_map.out, Channel.value("unfilt"))
}