diff nf/subworkflows/ncbi/gnomon-training-iteration/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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nf/subworkflows/ncbi/gnomon-training-iteration/main.nf	Sat Aug 03 11:16:53 2024 +0000
@@ -0,0 +1,98 @@
+#!/usr/bin/env nextflow
+nextflow.enable.dsl=2
+//nextflow.preview.recursion=true
+
+
+include { gnomon_training_iteration; gnomon_training_iteration as gnomon_training_iteration2; 
+            gnomon_training_iteration as gnomon_training_iteration3; gnomon_training_iteration as gnomon_training_iteration4 } from './utilities'
+            
+
+workflow gnomon_training_iterations {
+    take:
+        models_file
+        genome_asn
+        proteins_asn
+        chainer_alignments
+        chainer_evidence_denylist
+        chainer_gap_fill_allowlist
+        chainer_trusted_genes
+        chainer_scaffolds
+        gnomon_softmask_lds2
+        gnomon_softmask_lds2_source
+        gnomon_scaffolds
+        max_intron
+        parameters
+    main:
+    gnomon_training_iteration(models_file, genome_asn, proteins_asn ,chainer_alignments,chainer_evidence_denylist,chainer_gap_fill_allowlist,
+               chainer_trusted_genes, chainer_scaffolds, gnomon_softmask_lds2,
+               gnomon_softmask_lds2_source, gnomon_scaffolds, max_intron, parameters)
+    gnomon_training_iteration2(gnomon_training_iteration.out.hmm_params_file, genome_asn, proteins_asn ,chainer_alignments,
+               chainer_evidence_denylist,chainer_gap_fill_allowlist, chainer_trusted_genes, chainer_scaffolds, gnomon_softmask_lds2,
+               gnomon_softmask_lds2_source, gnomon_scaffolds, max_intron, parameters)
+    gnomon_training_iteration3(gnomon_training_iteration2.out.hmm_params_file, genome_asn, proteins_asn ,chainer_alignments,
+               chainer_evidence_denylist,chainer_gap_fill_allowlist, chainer_trusted_genes, chainer_scaffolds, gnomon_softmask_lds2,
+               gnomon_softmask_lds2_source, gnomon_scaffolds, max_intron, parameters)
+    gnomon_training_iteration4(gnomon_training_iteration3.out.hmm_params_file, genome_asn, proteins_asn ,chainer_alignments,
+               chainer_evidence_denylist,chainer_gap_fill_allowlist, chainer_trusted_genes, chainer_scaffolds, gnomon_softmask_lds2,
+               gnomon_softmask_lds2_source, gnomon_scaffolds, max_intron, parameters)
+
+    emit:
+        hmm_params_file = gnomon_training_iteration4.out.hmm_params_file
+}
+
+workflow gnomon_no_training {
+    take:
+        hmm
+     main:
+         process_no_training(hmm)
+    emit:
+        hmm_params_file = process_no_training.out.file
+}
+
+process process_no_training
+{
+  input:
+  val   hmm
+  output:
+    path "*.params" , emit: 'file' 
+  script:
+  """
+   curl -O  ${hmm} 
+  """
+  stub:
+  """
+  touch hmm.params
+  """
+}
+
+
+/*
+
+//experimental (preview.recursion)
+// to be used in the future
+workflow gnomon_training_iterations {
+    take:
+        models_file
+        genome_asn
+        proteins_asn
+        chainer_alignments
+        chainer_evidence_denylist
+        chainer_gap_fill_allowlist
+        chainer_trusted_genes
+        chainer_scaffolds
+        gnomon_softmask_lds2
+        gnomon_softmask_lds2_source
+        gnomon_scaffolds
+        max_intron
+        parameters
+    main:
+        gnomon_training_iteration
+            .recurse(models_file, genome_asn, proteins_asn ,chainer_alignments,chainer_evidence_denylist,chainer_gap_fill_allowlist, 
+               chainer_trusted_genes,  chainer_scaffolds, gnomon_softmask_lds2,
+               gnomon_softmask_lds2_source, gnomon_scaffolds, max_intron, parameters)
+            .times(4)
+    emit:
+        hmm_params_file = gnomon_training_iteration.out.hmm_params_file
+}
+
+*/