-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathestimateMutationAge.nf
41 lines (28 loc) · 1.02 KB
/
estimateMutationAge.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
#!/usr/bin/env nextfow
nextflow.enable.dsl = 2
include {
getAgeEstimateInputFile;
getVariantAgeEstimate;
collectAgeEstimateChains;
collectLocationEstimateChains;
} from "${projectDir}/modules/mutationAgeEstimate.nf"
workflow {
println "\nNow estimating ${params.variantId} age...\n"
//inputFile = getAgeEstimateInputFile()
nchains = channel.of(1..params.numberOfSimultaneousRuns)
nchains
.map { chain -> tuple("${params.variantName}-ageEstimate.${chain}", chain) } // create a group key similar to the one generated in paramsFiles bellow
.set { key_chains }
paramsFiles = getAgeEstimateInputFile()
paramsFiles
.map { group_key, file -> tuple( group_key, file.first() ) }
.set { key_params }
key_params
.join( key_chains )
.set { age_estimate_input }
mutationAge = getVariantAgeEstimate( age_estimate_input )
collectAgeEstimateChains(mutationAge)
collectLocationEstimateChains(mutationAge)
log.info "This is a test log info"
}
workflow.onComplete { println "Done estimating ${params.variantId} age...!\n" }