Mercurial > repos > fubar > egapx_runner
comparison nf/subworkflows/ncbi/target_proteins/paf2asn/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 | |
3 nextflow.enable.dsl=2 | |
4 | |
5 include { merge_params } from '../../utilities' | |
6 | |
7 | |
8 workflow paf2asn { | |
9 take: | |
10 genome_asn_file //path: genome asn file | |
11 proteins_asn_file //path: protein asn file | |
12 paf_file //path: paf alignment file from miniprot | |
13 parameters // Map : extra parameter and parameter update | |
14 main: | |
15 default_params = "" | |
16 effective_params = merge_params(default_params, parameters, 'paf2asn') | |
17 run_paf2asn(genome_asn_file, proteins_asn_file, paf_file, effective_params) | |
18 | |
19 emit: | |
20 asn_file = run_paf2asn.out.asn_file | |
21 } | |
22 | |
23 | |
24 process run_paf2asn { | |
25 label 'long_job' | |
26 input: | |
27 path genome, stageAs: 'LDS_Index/genome.asnt' | |
28 path proteins, stageAs: 'LDS_Index/proteins.asnt' | |
29 path paf_file // list of PAF files to convert | |
30 val parameters | |
31 output: | |
32 path 'output/*.asn', emit: 'asn_file' | |
33 script: | |
34 def asn_name = paf_file.baseName.toString() + ".asn" | |
35 """ | |
36 mkdir -p output | |
37 lds2_indexer -source LDS_Index | |
38 echo "${paf_file.join('\n')}" > input.mft | |
39 paf2asn ${parameters} -lds2 LDS_Index/lds2.db -nogenbank -input-manifest input.mft -o output/${asn_name} | |
40 """ | |
41 stub: | |
42 def asn_name = paf_file.baseName.toString() + ".asn" | |
43 """ | |
44 mkdir -p output | |
45 touch output/${asn_name} | |
46 """ | |
47 } |