Mercurial > repos > fubar > egapx_runner
comparison nf/subworkflows/ncbi/orthology/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 // main nextflow script for EGAPx execution | |
3 // route data to subworkflows | |
4 | |
5 nextflow.enable.dsl=2 | |
6 | |
7 | |
8 include { extract_products_from_models } from './extract_products_from_models/main' | |
9 include { find_orthologs; fetch_ortholog_references; } from './find_orthologs/main' | |
10 include { diamond_orthology } from './diamond_orthology/main' | |
11 include { setup_genome; setup_proteins } from './../setup/main' | |
12 include { get_swiss_prot_ids as get_prot_ref_ids } from '../shared/diamond/main' | |
13 | |
14 params.intermediate = false | |
15 | |
16 | |
17 workflow orthology_plane { | |
18 take: | |
19 genome_asnb | |
20 gencoll_asn | |
21 models | |
22 annot_files | |
23 task_params // task parameters for every task | |
24 main: | |
25 // Protein alignments | |
26 fetch_ortholog_references() | |
27 def (scaffolds_ref, gencoll_ref_asn, unpacked_genome_ref, genome_ref_asn, genome_ref_asnb) = setup_genome(fetch_ortholog_references.out.p14_genomic_fna, [], task_params.get('setup', [:])) | |
28 def (unpacked_proteins_ref, proteins_ref_asn, proteins_ref_asnb) = setup_proteins(fetch_ortholog_references.out.p14_protein_faa, task_params.get('setup', [:])) | |
29 def prot_ref_ids = get_prot_ref_ids(proteins_ref_asnb) | |
30 //orthology plane | |
31 extract_products_from_models(annot_files, task_params.get('extract_products_from_models', [:])) | |
32 // reference side. 1) gencoll, annotation , genome and protein sequence --> asn cashe or LDS demon | |
33 | |
34 diamond_orthology(extract_products_from_models.out.prot_ids, prot_ref_ids , models, proteins_ref_asnb , task_params.get('diamond_orthology', [:])) | |
35 | |
36 // input side 1) gencoll asn from setup, genome_asn from setup, protein from gnomon_wnode.out, annotation it is from annotbuilder annot_files or accepts_asn | |
37 find_orthologs( gencoll_asn, gencoll_ref_asn, annot_files, fetch_ortholog_references.out.annot_file, diamond_orthology.out.alignments, [], | |
38 models, proteins_ref_asnb , genome_asnb, genome_ref_asnb , task_params.get('find_orthologs', [:])) | |
39 | |
40 emit: | |
41 orthologs = find_orthologs.out.orthologs | |
42 } | |
43 |