-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscciteseq.nf
48 lines (38 loc) · 1.64 KB
/
scciteseq.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
// Read and process CTG samplesheet (must be plain .csv - not directly from excel)
samplesheet = file(params.samplesheet)
// Import modules
// QC Modules
include { FASTQC } from "../modules/fastqc/main"
include { CELLRANGER_COUNT_TO_MULTIQC } from "../modules/cellranger2multiqc/count/main"
// Input Parsing
include { SPLITSHEET } from "../modules/split_sheet/main"
include { FILTER_FEATURE_REFERENCE } from "../modules/filter_featureref/main"
include { GENERATE_LIB_CSV } from "../modules/multi_config/generate_lib/main"
// Sample Processing
include { COUNT } from "../modules/cellranger/count-citeseq/main"
// FINISH MODULE
include { FINISH_PROJECTS } from "./finish.nf"
workflow SCCITESEQ {
sheet_ch = SPLITSHEET(samplesheet, 'scciteseq-10x')
// all samplesheet info
sample_info_ch = sheet_ch.data
.splitCsv(header:true)
.map { row -> tuple( row.Sample_ID, row.Sample_Species, row.Sample_Project, row.sample_pair, row.libtype) }
.groupTuple(by:3)
sample_fastqc_ch = sheet_ch.data
.splitCsv(header:true)
.map { row -> tuple( row.Sample_ID, row.Sample_Project) }
FASTQC(sample_fastqc_ch)
lib_ch = GENERATE_LIB_CSV(sample_info_ch)
feature_reference_ch = FILTER_FEATURE_REFERENCE(sheet_ch.feature_reference, lib_ch.sample_name)
count_ch = COUNT(lib_ch.library, feature_reference_ch, lib_ch.sample_name, lib_ch.sample_project, lib_ch.sample_species )
mqc_conf_ch = CELLRANGER_COUNT_TO_MULTIQC(
count_ch.sample_id.collect(),
count_ch.project_id.collect(),
'citeseq'
)
FINISH_PROJECTS (
mqc_conf_ch.project_id.flatten().unique(),
'scciteseq-10x'
)
}