Mercurial > repos > fubar > egapx_runner
comparison nf/subworkflows/ncbi/gnomon/gnomon_training/main.nf @ 0:d9c5c5b87fec draft
planemo upload for repository https://github.com/ncbi/egapx commit 8173d01b08d9a91c9ec5f6cb50af346edc8020c4
author | fubar |
---|---|
date | Sat, 03 Aug 2024 11:16:53 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d9c5c5b87fec |
---|---|
1 #!/usr/bin/env nextflow | |
2 nextflow.enable.dsl=2 | |
3 | |
4 include { merge_params } from '../../utilities' | |
5 | |
6 workflow gnomon_training { | |
7 take: | |
8 genome_asn | |
9 models_file | |
10 max_intron1 // max intron length, name modified from max_intron to pacify stupid Nextflow compiler | |
11 parameters // Map : extra parameter and parameter update | |
12 main: | |
13 default_params = "-b -asn -maxintron 1200000" | |
14 effective_params = merge_params(default_params, parameters, 'gnomon_training') | |
15 run_gnomon_training(genome_asn, models_file, max_intron1, effective_params) | |
16 emit: | |
17 hmm_params_file = run_gnomon_training.out.hmm_params_file | |
18 } | |
19 | |
20 | |
21 process run_gnomon_training { | |
22 input: | |
23 path genome_asn, stageAs: 'indexed/*' | |
24 path models_file | |
25 val max_intron1 | |
26 val parameters | |
27 output: | |
28 path ('output/hmm_params.asn'), emit: 'hmm_params_file' | |
29 | |
30 script: | |
31 // Substitute -maxintron with correct value coming from max_intron | |
32 def dummy = ["dummy" : "-maxintron ${max_intron1}"] | |
33 parameters = merge_params(parameters, dummy, "dummy") | |
34 """ | |
35 mkdir -p output | |
36 lds2_indexer -source indexed -db ./indexed_lds | |
37 gnomon_training ${parameters} -nogenbank -lds2 ./indexed_lds -input ${models_file} -out output/hmm_params.asn | |
38 """ | |
39 stub: | |
40 def dummy = ["dummy" : "-maxintron ${max_intron1}"] | |
41 parameters = merge_params(parameters, dummy, "dummy") | |
42 println("Gnomon training parameters: ${parameters}") | |
43 """ | |
44 mkdir -p output | |
45 touch output/hmm_params.asn | |
46 """ | |
47 } |