forked from juliaapolonio/ukb_ppp_gsmr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
59 lines (47 loc) · 1.74 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
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FILES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
// exposures
reads = Channel.fromPath('/storages/acari/julia.amorim/qtls/pqtl/ukb-ppp/*.tar')
// banco de dados -> arquivo de texto com os filenames
reference = Channel.fromPath("/storages/acari/julia.amorim/references/plink_bfile/EUR_phase3_chr*")
reference.map { it -> it.getBaseName() }.unique().collectFile(name: "gsmr.input.txt", newLine:true).collect().set { ref_file }
reference.collect().set { collected_ref }
// sumstats outcome
outcome = "/storages/acari/julia.amorim/qtls/SDEP_rsID.txt"
// inner join no script do r
sumstats = file("/data/home/julia.amorim/scripts/data/sumstats/MTAG_depression_sumstats_hg38.txt")
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT NF-CORE MODULES/SUBWORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { UNTAR } from "./modules/nf-core/untar/main.nf"
include { MERGE } from "./modules/local/merge_file/merge_file.nf"
include { R_LIFT } from "./modules/local/r_lift/rscript_format.nf"
include { GCTA_GSMR } from "./modules/local/gcta_gsmr/gsmr.nf"
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
workflow {
UNTAR (
reads
)
MERGE (
UNTAR.out.untar
)
R_LIFT (
MERGE.out.merged,
sumstats
)
GCTA_GSMR (
R_LIFT.out.lifted,
collected_ref,
outcome,
ref_file
)
}